in reply to sort by a multiple columns

Here's a Schwartzian Transform solution (assuming your numbers don't exceed 12 digits):
print join "\n", map { join ',', @{$_->[0]} } sort { $a->[1] cmp $b->[1] } map { my $x; for(@$_){$x.=sprintf("%012d",$_)}; [$_,$x] } @un_sorted;

Caution: Contents may have been coded under pressure.