$hi = do_this('asdf');
sub do_this
{
$blob{'f'} = {
'k' => 'j'
};
}
print $hi->{'k'};
# prints j
since do_this doesn't return anything, how does it still print j?
$hi = do_this('asdf');
sub do_this
{
$blob{'f'} = {
'k' => 'j'
};
}
print $hi->{'k'};
# prints j
since do_this doesn't return anything, how does it still print j?
http://perldoc.perl.org/functions/return.html
In the absence of an explicit return, a subroutine, eval, or do FILE automatically returns the value of the last expression evaluated
All Perl 5 subroutines return the last value of the last statement executed.