No such thing as a small change | |
PerlMonks |
Re^2: Determining subroutine return typeby sandfly (Beadle) |
on Feb 24, 2005 at 23:16 UTC ( [id://434298]=note: print w/replies, xml ) | Need Help?? |
Subs returning arrays behave differently to subs returning lists. If your sub returns an array, calling it in scalar context gets you the number of elements. In list context there's no difference.
prints 3, not 6.
In Section
Seekers of Perl Wisdom
|
|