Re: remove duplicate lines



Am Freitag, 27. Mai 2005 17.15 schrieb Eric Walker:
> Can't you run uniq from the command prompt to get rid of the duplicate
> lines?
>
> perlnewbie..

[...]

Yes I can,

$ cat marc21textfile | uniq > outputfile

but the OP explicitly wanted a perl script and states

> For now, I just want to remove adjacent duplicate fields.

from which I concluded that he wants to elaborate the script further,

and as a perlnewbie on a perl list I try to answer perl questions.

thanks,
joe
.



Relevant Pages

  • Re: remove duplicate lines
    ... > but the OP explicitly wanted a perl script and states ... I just want to remove adjacent duplicate fields. ... > and as a perlnewbie on a perl list I try to answer perl questions. ... the perlnewbie tag is for me, ...
    (perl.beginners)
  • RE: Segmentation Fault(Core dumped)
    ... But when I started testing my perl script, ... Compilation failed in require at ./test.pl line 13. ... > official business of Sender. ...
    (perl.dbi.users)
  • Re: sharing variables-data perl-asp
    ... Also how do you invoke a perl script from an active server page? ... ASP in Perl. ... Why do you want to shell out to perl when you're already running perl? ...
    (comp.lang.perl.misc)
  • Re: environment variables in perl scripts
    ... Define a BEGIN block in your perl program. ... > perl script, something like: ... > environment variables are there and diag.txt shows ... > This communication is intended for the use of the ...
    (perl.dbi.users)
  • Re: kill process when file count reached,,.
    ... an infinite loop there, ... IMO you could just use readdir and grep in perl. ... You're using awk in backticks in a perl script? ... Perl has a kill builtin, why the hell not use that. ...
    (comp.lang.perl.modules)