Tielman Koekemoer (TNE) wrote:

Wow, I'm really confused. I'm trying to remove duplicate lines from a marc21 text file. I have spent countless hours searching for scripts etc.

I'm also very new to Perl and wrote a long and newbyish script that
does exactly what the Unix command "sort FILENAME | uniq" does just to
see how it can be done.

How long?  Because you can do that on one line in perl.  :-)

perl -e'print sort grep !$seen{$_}++, <>' FILENAME



John
--
use Perl;
program
fulfillment

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to