$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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With