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

Re^3: Array Sort

by ikegami (Patriarch)
on May 10, 2011 at 19:18 UTC ( [id://904019]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    # ST
    my @fhs =
    ...
       sort { $a->[1] <=> $b->[1] }
       map [ $_, fileno($_) ],
       get_fhs();
    
  2. or download this
    # GRT
    my @fhs = get_fhs();
    ...
       sort
       map pack('NN', fileno($fhs[$_]), $_),
       0..$#fhs;
    
  3. or download this
    # GRT
    my @fhs = get_fhs();
    ...
       map pack('NN', fileno($fhs[$_]), $_),
       0..$#fhs
    ];
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (3)
As of 2024-04-24 02:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found