more useful options | |
PerlMonks |
Re: Using splitby robartes (Priest) |
on Mar 07, 2003 at 09:03 UTC ( [id://241090]=note: print w/replies, xml ) | Need Help?? |
pop expects an array, whereas split returns a list. This is one of those cases where the difference between arrays (which can have elements popped off) and lists (which can't) is important. You could use some syntactic sugar to transform the list into an anonymous array, as in:
Update: Changed example to OP's example. CU
In Section
Seekers of Perl Wisdom
|
|