my %data = (1 => 'c', 2 => 'b', 3 => 'a'); foreach my $val (@data{sort keys %data}) { print $val . $/; }
Originally posted as a Categorized Answer.
In reply to Re: How do I print the values of a hash, sorted by the hash keys?
by kwaping
in thread How do I print the values of a hash, sorted by the hash keys?
by kwaping
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |