http://qs321.pair.com?node_id=604948


in reply to Sorting a text file

You don't even need Perl for this. Assuming that you are on a *nix system (perhaps a poor assumption), then you could simply do:
sort -nk2 file.txt

Update: It turns out that MS-DOS also has a sort command (I never knew that!). So on a winders system, the following from a command prompt:

sort /+10 file.txt
(Assumes spaces between the 1st and 2nd fields, rather than tabs)

Cheers,
Darren :)