more useful options | |
PerlMonks |
Sort of anonymous hashby larsss31 (Acolyte) |
on Sep 29, 2009 at 16:21 UTC ( [id://798152]=perlquestion: print w/replies, xml ) | Need Help?? |
larsss31 has asked for the wisdom of the Perl Monks concerning the following question:
Hi Monks, i have a question regarding the sorting of on-the-fly created hashes. Consider the following code:
that compares keys, by key value, of a map-created hash and outputs a list. Fair straightforward, so far. The question being: how can i sort those keys BY HASH VALUE, considered that i don't have an hash name to prepend to the key. I mean, the classic sort { $hash{$a} cmp $hash{b} } keys %hash, but without an "%hashname". Thanks for all your tips larss
Back to
Seekers of Perl Wisdom
|
|