in reply to Re^2: I am confused by a "Learning Perl" sample showing "unshift"
in thread I am confused by a "Learning Perl" sample showing "unshift"
unshift @a, @b means @a = ( @b, @a )
Much the same way as
push @a, @b means @a = ( @a, @b )
So no implicit reversing of @b.
HTH :)
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: I am confused by a "Learning Perl" sample showing "unshift"
by rsFalse (Chaplain) on Jan 23, 2021 at 21:48 UTC | |
by choroba (Cardinal) on Jan 23, 2021 at 21:51 UTC | |
by LanX (Saint) on Jan 23, 2021 at 22:10 UTC |