Regarding below code, how does $one_sub and $two_sub become coderef's to the anonymous subroutines within named sub "sup"? The named sub isn't 'returning' those two anon subs; or is it? (at least I haven't put such a statement).
sub sup {
my $neh = sub {
say "this is 'neh' subroutine"
};
my $hen = sub {
say "this is 'hen' subroutine"
};
($neh, $hen);
}
my ($one_sub, $two_sub) = ⊃
Using Data::Dumper::Streamer show's :
$CODE1 = sub {
use warnings;
use strict;
no feature;
use feature ':5.10';
say q[this is 'neh' subroutine];
};
$CODE1 = sub {
use warnings;
use strict;
no feature;
use feature ':5.10';
say q[this is 'hen' subroutine];
};
perldoc -f return: "In the absence of an explicitreturn, a subroutine,eval, ordo FILEautomatically returns the value of the last expression evaluated."&. That means "ignore any prototype on the sub". Unless that's what you meant to do, of course.@_.