in reply to perl functionality like unix's "sort -u" and "uniq -c"

As much as I would like it to be, Perl is not the answer to everything. I personally would stick with the shell commands.

I've not used File::Sort, but lets assume it sorts the file... I'd do something like

open(FILE, "sorted.file"); while (<FILE>) { if($_ != $previous) { print $current; $count++; } $previous = $_; } print "There are $count unique records";
Code is untested and not well formated, but hopefully you'll get the idea.