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

Steve, can I ask if you are doing that because we really need to do it in Perl, or just to learn? I mean, those two unix programs are very efficient, so, why not just use them?

Also, you can open shell pipes as if they were files. So, you can easilly do:

open PIPE, "sort file | uniq -c |"; while(<PIPE>) { }

Ok, I know I didn't help you how to write those scripts in Perl, but I hope I made you think if you really need to rewrite those tools in Perl.

Alberto Simões