Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^2: Sorting Hash / Array

by sauoq (Abbot)
on May 16, 2012 at 18:23 UTC ( [id://970885]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my @result2 = sort custom keys %$VAR2;
    
  2. or download this
    my @result = sort { 
            $VAR1->{$a}{network} cmp $VAR1->{$b}{network} 
        } keys %$VAR1;
    
  3. or download this
    sub keys_sorted_by_network { 
        my $h = shift; 
        sort { $h->{$a}{network} cmp $h->{$b}{network} } keys %$h;
    }
    my @result = keys_sorted_by_network($VAR1);
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (8)
As of 2024-04-19 12:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found