On Aug 29, [EMAIL PROTECTED] said: >foreach my $MyKey (sort { $a->[1]<=>$b->[1] } map{[$_,$h{$_}[2]]} keys %h) { > printf "%-s -> %-s\n", $MyKey->[0], $MyKey->[1]; >}
You made that extra-difficult. The sorting field is already given to us in the hash, so it needn't be manufactured. sort { $hash{$a}[2] <=> $hash{$b}[2] } keys %hash -- Jeff "japhy" Pinyan [EMAIL PROTECTED] http://www.pobox.com/~japhy/ RPI Acacia brother #734 http://www.perlmonks.org/ http://www.cpan.org/ ** Look for "Regular Expressions in Perl" published by Manning, in 2002 ** <stu> what does y/// stand for? <tenderpuss> why, yansliterate of course. [ I'm looking for programming work. If you like my work, let me know. ] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]