Cool Perl 6: Hash sorts
By default, hashes sort by key:
my %scores = < pmichaud 52 mäsak 95 PerlJam 78 >; .say for %scores.sort;
Result:
PerlJam 78 mäsak 95 pmichaud 52
Perl 6 | Perl 6 today | #31 |
By default, hashes sort by key:
my %scores = < pmichaud 52 mäsak 95 PerlJam 78 >; .say for %scores.sort;
Result:
PerlJam 78 mäsak 95 pmichaud 52
Copyright © 2009 http://www.pmichaud.com/2009/pres/ |