go ahead... be a heretic | |
PerlMonks |
Re^3: regexp list return 5.6 vs 5.8by Errto (Vicar) |
on Jan 24, 2008 at 15:59 UTC ( [id://664059]=note: print w/replies, xml ) | Need Help?? |
You're right about the behavior of slices, but it has nothing to do with subroutine returns. See for example:
The issue is that an array (or hash, or list) slice in scalar context returns the last element of the slice. I feel like this should be documented in perldata but a quick read of it just now didn't reveal any such indication.
In Section
Seekers of Perl Wisdom
|
|