Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Crazy hash sorting issue.

by kirbyk (Friar)
on Nov 04, 2005 at 18:15 UTC ( #505821=note: print w/replies, xml ) Need Help??


in reply to Crazy hash sorting issue.

TMTOWTDI, of course, but how about:
foreach my $key (sort { substr($hash{$a}, -2) cmp substr($hash{$b}, -2 +) } keys %hash) { print $key . ' ' . $hash{$key} . "\n"; }
Tested, seems to work.

-- Kirby, WhitePages.com

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://505821]
help
Chatterbox?
[Corion]: Likely the date of the release of the module
[Corion]: Yep, seems like that
[Perl300]: ok, thank you Corion
[Perl300]: I was researching few modules and was not sure about what that date indicates

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (11)
As of 2017-12-11 18:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What programming language do you hate the most?




















    Results (310 votes). Check out past polls.

    Notices?