Do you know where your variables are? | |
PerlMonks |
Re: More efficient dereferencing of a subroutine returnby LanX (Saint) |
on Feb 18, 2013 at 02:40 UTC ( [id://1019264]=note: print w/replies, xml ) | Need Help?? |
Are you aware that Perl has list-context?
If you still need to return an array-ref in other cases just check wantarray in a condition to see if a scalar is expected.
Cheers Rolf
In Section
Seekers of Perl Wisdom
|
|