Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Perl 6 sorting (was: Re: Sort: By keys, values, and their returning values.)

by moritz (Cardinal)
on Nov 26, 2009 at 10:50 UTC ( [id://809530]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my @sorted_keys = %hash.keys.sort
    
  2. or download this
    %hash.keys.sort({ %hash{$_} });
    
  3. or download this
    # return a random, anonymous hash:
    sub h {
    ...
    
    # and get the keys sorted numerically by value:
    my @keys = h().sort( { .value })>>.key
    

Log In?
Username:
Password:

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

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

    No recent polls found