in reply to Re: Array Sorting Trouble
in thread Array Sorting Trouble

You are right. Here is a version that saves the keys:

%my_array=(Key_One=>["50","25","100","90"], Key_Two=>["35","18","110","72"], Key_Three=>["100","35","99","82"] ); $a_key = each %my_array; for $column (0 .. $#{$my_array{$a_key}}) { @a = sort { $b->[0] <=> $a->[0] } map { [$my_array{$_}[$column], $_] } keys %my_array; print $column+1, ": $a[0][1]=$a[0][0], $a[1][1]=$a[1][0] \n"; }