Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: retrieving from a hash numerically

by dirac (Beadle)
on Jul 04, 2005 at 13:27 UTC ( [id://472230]=note: print w/replies, xml ) Need Help??


in reply to retrieving from a hash numerically

my (%H, @keys, @vals);
@vals = qw (e c a b d);
@keys = (5, 3, 1, 2, 4);
@H{@keys} = @vals;

print map{"$_: $H{$_}\n"} sort{ $a <=> $b } keys %H;

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (6)
As of 2024-04-23 07:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found