in reply to Perl sorting unique values
If you are open to non-Perl solutions, I will recommend Unix cut and sort commands. They are very easy to use.