Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Push Function and Hash

by tangent (Parson)
on Mar 28, 2013 at 01:32 UTC ( [id://1025832]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    %health = (
        'John Kay' => [151,128],
        'Sally Gi' => [174,145],
    );
    
  2. or download this
    while ( my ($patient,$levels) = each %health ) {
        my @ascending = sort {$a <=> $b} @$levels;
    ...
        my @descending = sort {$b <=> $a} @$levels;
        print "$patient: @descending\n";
    }
    
  3. or download this
    John Kay: 128 151
    Sally Gi: 145 174
    
    John Kay: 151 128
    Sally Gi: 174 145
    

Log In?
Username:
Password:

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

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

    No recent polls found