Re: removing duplicates



Rob Dixon wrote:
obdulio santana wrote:
May be this helps

perl -lne "print if ++$D{$_} == 1" address.txt

You may prefer the cuteness of

perl -lne "print unless $D{$_}++" address.txt

My apologies. That requires single quotes:

perl -lne 'print unless $D{$_}++' address.txt

to avoid perpetuating the earlier problem.

Rob
.



Relevant Pages

  • Re: time format error
    ... My apologies for such a late reply. ... I put the profiler to work and found the queries that I'm ... pstrQuery->Replace call so that my logfile showed the single quotes ... string is the same string the user sees. ...
    (comp.databases.ms-sqlserver)
  • Re: CSS and Firefox
    ... > Apologies. ... there is a space between staging and the rest of the ... How about changing the single quotes to double quotes on the IDs of ... Sonhos vem. ...
    (comp.infosystems.www.authoring.stylesheets)