On 2012-03-25 22:13, Chris Stinemetz wrote:

Any advice on how to include a numerical sort on the second key? I've
been trying to resolve this for a while and have had no luck.

Use a block sort to sort numerically:

perl -E '%h=qw(3 a 2 b 1 c 4 d); say sort { $a<=>$b } keys %h;'

Show us what you have so far if you need help with a specific code segment.

Steve

--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/



Reply via email to