Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: sorting HoH according to value

by mwah (Hermit)
on May 27, 2008 at 14:02 UTC ( [id://688664]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
     ...
     my @flipped_hash = reverse sort {$a->[0] <=> $b->[0] } flippout %bdry
    +;
      ...
    
  2. or download this
     ...
     for my $k ( @flipped_hash ) {
        print " \$bdry{$k->[1]}{$k->[2]} = $k->[0];\n",
     }
     ...
    
  3. or download this
     $bdry{1}{2} = 3;
     $bdry{3}{4} = 2;
     $bdry{2}{3} = 1;
    
  4. or download this
     ...
     sub flippout {
    ...
      return @f
     }
     ...
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (1)
As of 2024-04-25 01:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found