in reply to Hash sorting
artist
my @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"; } } } [download]
Updated:Items and Sections are not numerical.
Updated:Argh! Nevermind. Tiredness and programming don't mix.