![]() |
|
XP is just a number | |
PerlMonks |
Re: How do I print the values of a hash, sorted by the hash keys?by Russ (Deacon) |
on Jan 12, 2007 at 19:39 UTC ( #594435=note: print w/replies, xml ) | Need Help?? |
There's more than one way to do it.
Here's the obvious way:
Here it is, using a map within a single print call:
Here's a way using a hash slice:
Even the slice can be printed in a single print call:
Of course, you'll want to set up the variables $, and $\ appropriately...
In Section
Seekers of Perl Wisdom
|
|