Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Sorting hashes...

by salva (Canon)
on May 11, 2007 at 09:07 UTC ( [id://614853]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my @box;
    for (...) {
    ...
                  $MinX, $MinY, $MaxX, $MaxY,
                  ($MaxX - $MinX) * ($MaxY - $MinY)];
    }
    
  2. or download this
    @box = sort { $a->[5] <=> $b->[5] } @box;
    
  3. or download this
    use Sort::Key qw(nkeysort_inplace);
    
    nkeysort_inplace { $_->[5] } @box;
    
  4. or download this
    
    # untested!
    ...
      }
      return ($max, @max);
    }
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (3)
As of 2024-03-29 06:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found