|
|
|
Clear questions and runnable code get the best and fastest answer |
|
| PerlMonks |
Re^2: why can't I shift a split?by johngg (Canon) |
| on Aug 27, 2022 at 15:16 UTC ( [id://11146472]=note: print w/replies, xml ) | Need Help?? |
|
#print "\n", shift(234, 4, 55, 1900); # Error: Can't overwrite the array, because it's fixed. shift works by default on @_ in a subroutine (also true of pop) so you could use an on-the-fly sub to operate on a list.
I hope this is helpful. Update: Corrected typo, s{on (?=by default)}{}. Cheers, JohnGG
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||||