in reply to Sorting a text file
grep { $_->[2] =~ $rxExtract }
with
sort { $a->[2] <=> $b->[2] }
Note that I have used a numerical comparison in the sort (<=>) just in case your second column has numbers of other than four digits. If there will always be only four digits you could use string comparison (cmp).
I hope this is of use
Cheers,
JohnGG
|
|---|