Arjenmy @items = qw(item in array); my @sections = qw(one two three); my @count = qw(6 3 4 2 1 5); sub numerically { $a <=> $b }; foreach my $c (sort numerically @count) { foreach my $s (sort numerically @sections) { foreach my $i (sort numerically @items) { print "$c $s $i\n"; } } }
Updated:Items and Sections are not numerical.
Updated:Argh! Nevermind. Tiredness and programming don't mix.
In reply to Re: Re: Hash sorting
by Aragorn
in thread Hash sorting
by artist
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |