Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: How to sort output?

by quester (Vicar)
on Jul 22, 2007 at 07:00 UTC ( #628089=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my @sorted=
      map { $_->[0] }
      sort { $a->[1] cmp $b->[1] }
      map { [$_, ( / (\d*\.\d*) ms/ and $1 or 0 ) ] }
      @data;
    
  2. or download this
    / (\d*\.\d*) ms/ and $1 or 0
    
  3. or download this
    my @sorted=
      map { $_->[0] }
      sort { $a->[1] <=> $b->[1] }
      map { [$_, ( / (\d*\.\d*) ms/ and $1 or 0 ) ] }
      @data;
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (3)
As of 2014-08-30 05:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (291 votes), past polls