Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Reordering Arrays?

by johngg (Canon)
on Jul 28, 2006 at 14:52 UTC ( [id://564367]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use strict;
    use warnings;
    ...
    
    @newList = @list[@newOrder];
    print qq{@newList\n};
    
  2. or download this
    zero one two three four
    three zero four one two
    one three four zero two
    
  3. or download this
    This code
    
    ...
    $newList[2] receives $list[4] which is 'four'
    $newList[3] receives $list[0] which is 'zero'
    $newList[4] receives $list[2] which is 'two'
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (3)
As of 2024-04-19 22:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found