in reply to Re^2: sorting the column of array element
in thread sorting the column of array element

To clear, i have to sort the $array[0] which is a column of numbers out of three columns of a file.None of the code above works actually...dunno. Thanks
  • Comment on Re^3: sorting the column of array element

Replies are listed 'Best First'.
Re^4: sorting the column of array element
by sauoq (Abbot) on May 24, 2012 at 12:27 UTC
    None of the code above works actually.

    The code I gave you in my first response works fine for me:

    t$ perl -le 'my @o=([3, 1, 2]);print "@{$o[0]}";my @s=sort {$b <=> $a} + @{$o[0]};print"@s";' 3 1 2 3 2 1

    -sauoq
    "My two cents aren't worth a dime.";