The stupid question is the question not asked | |
PerlMonks |
Re: I am confused by a "Learning Perl" sample showing "unshift"by haukex (Archbishop) |
on Jan 22, 2021 at 20:43 UTC ( [id://11127307]=note: print w/replies, xml ) | Need Help?? |
My question is why is it that way? See unshift: Note the LIST is prepended whole, not one element at a time, so the prepended elements stay in the same order. Use reverse to do the reverse.
In Section
Seekers of Perl Wisdom
|
|