in reply to How to sort?

This is something where very idiomatic "perlish" solutions exist, like:
# open the file open my $fh, '<', 'myfile.dat' or die "$!" # translate the data into a 2D array my @rows = map [ split /\s+/ ], <$fh>; # sort on any column my @sorted = sort { $a->[1] cmp $b->[1] } @rows; # print the result print "@$_\n" for @sorted;

I think this will do it here. As in Re: How to sort? noted, this doesn't look like a real "csv" data file.

Regards

mwa