Do you know where your variables are? | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Is the behavior of list slice subroutine return an intended feature A slice is not an array. What you return is what you get. I don't see any magic there. You're definitely right about not golfing production code. This is from a test script however - I allow myself a little more relaxed way of coding in those. :-) I think I understand the thing now - it's an XY case if I'm correct. That subroutine's return value has been assigned to a scalar and that has been pushed to an array. Maybe this code works differently on 5.6?
What I expect and get on 5.8.8 is:
Update: Modified the code to more closely follow the original.
use strict; use warnings; print "Just Another Perl Hacker\n";
In reply to Re: regexp list return 5.6 vs 5.8
by Sixtease
|
|