http://qs321.pair.com?node_id=1079519


in reply to Re: sort hash by value (sort array)
in thread sort hash by value

That would be easier except this is tied into a GUI and user values are going into array 0, old values are in array 1. I think you may have given me an answer anyhow though; flaten tag, type, and string into a 2d array then sort then use that output to order the hash output...
#head of code my @array; foreach my $tag (keys %licensehash) { foreach my $type (keys %{$licensehash{$tag}}) { push(@array, [$tag,$type,$licensehash{$tag}{$type}[3]]); } } @array = sort {$a->[2] cmp $b->[2]} @array; #body of program (used more than once) foreach my $order (@array) { print "$licensehash{@$order[0]}{@$order[1]}[3]"; }