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 reply to Re: I am confused by a "Learning Perl" sample showing "unshift"
by haukex
in thread I am confused by a "Learning Perl" sample showing "unshift"
by KenAndrews
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |