in reply to Re: MsExcel like Multi Column Sorting
in thread MsExcel like Multi Column Sorting

To apply this code to the data structure as given by the op, this gives:
@sorted = sort { $a->{key2} cmp $b->{key2} || $a->{num1} <=> $b->{num1} || $a->{key3} cmp $b->{key3} || } @data;
Note that to sort descending for one column, just swap $a and $b in the comparison expression, for that column.