@c = map pop @a, @a;;
Much simpler, true, but destructive if that is a concern.
johngg@shiraz:~/perl > perl -Mstrict -Mwarnings -E ' my @arr = ( q{a} .. q{z} ); my @rev = map pop @arr, @arr; say qq{@arr}; say qq{@rev};' z y x w v u t s r q p o n m l k j i h g f e d c b a
Cheers,
JohnGG
In reply to Re^3: Array confusion.
by johngg
in thread Array confusion.
by anonypl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |