in reply to Re: unshift single scalar
in thread unshift single scalar
That's the code you posted as demonstration of what you want
DB<108> @array = ( "Top" ); => "Top" DB<109> @output=1..3 => (1, 2, 3) DB<110> unshift (@array, @output); => 4 DB<111> @array => (1, 2, 3, "Top")
and that's what push does
DB<112> push @output, "Top" => 4 DB<113> @output => (1, 2, 3, "Top")
maybe you should check your examples before posting?
Besides: I've never heard of "bottom" or "top" of lists or even arrays. "Start" and "End" are much better description for chains w/o any vertical orientation.
Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: unshift single scalar
by AppleFritter (Vicar) on Aug 10, 2014 at 09:18 UTC | |
by LanX (Saint) on Aug 10, 2014 at 11:44 UTC |