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
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: perl functionality like unix's "sort -u" and "uniq -c"
by jfroebe (Parson) on Apr 08, 2005 at 19:12 UTC | |
by Tanktalus (Canon) on Apr 09, 2005 at 04:11 UTC |
In Section
Seekers of Perl Wisdom