Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^3: Sorting integer value hash keys

by ikegami (Patriarch)
on Dec 25, 2009 at 19:25 UTC ( [id://814365]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    say join "\n", sort { $a <=> $b } keys %{{ map { $_ => 0 } 1..10 }}
    
  2. or download this
    say for sort { $a <=> $b } keys %{{ map { $_ => 0 } 1..10 }}
    
  3. or download this
    say for sort { $a <=> $b } 1..10;
    
  4. or download this
    say for sort { $a <=> $b } map "$_", 1..10;
    

Log In?
Username:
Password:

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

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

    No recent polls found