|
|
| go ahead... be a heretic | |
| PerlMonks |
Re^2: Determining subroutine return typeby sandfly (Beadle) |
| on Feb 24, 2005 at 18:16 UTC ( [id://434298]=note: print w/replies, xml ) | Need Help?? |
This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.
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
|
|
||||||||||||||||||||||||