This simple perl script does the job of sort -u (of course not in windows)
How to run:
Lets assume that our script is saved as my_unique.pl
* Without angular brackets.
Here in Perl hash the duplicate keys are overridden which means only single instance of each line in the file is stored in the hash. Remember that while storing the lines in hash each single line is treated as key so as to remove duplicates.
Note: Always use strict and use warnings when dealing with Perl code so as to write bug free code.