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
In reply to Re: Sorting a text file
by johngg
in thread Sorting a text file
by rsriram
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |