Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^2: Array manipulation how to

by JavaFan (Canon)
on Feb 07, 2012 at 11:32 UTC ( [id://952250]=note: print w/replies, xml ) Need Help??


in reply to Re: Array manipulation how to
in thread Array manipulation how to

And without an additional variable:
push @a, shift @a; unshift @a, pop @a;

Replies are listed 'Best First'.
Re^3: Array manipulation how to
by chessgui (Scribe) on Feb 07, 2012 at 11:39 UTC
    would this work?
    @_=@a; push, shift; @_=@a; unshift, pop;
      No, as that doesn't modify @a.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://952250]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (3)
As of 2024-04-26 01:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found