Beefy Boxes and Bandwidth Generously Provided by pair Networks Joe
P is for Practical
 
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 wandering the Monastery: (6)
As of 2014-04-19 08:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (478 votes), past polls