From: "John W. Krahn" <[EMAIL PROTECTED]>
> 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
>
> Or the shortness of:
>
> perl -ne'$D{$_}++||print' address.txt
>
> John
Well, since you started golfing ...
perl -ne'$D{$_}||=print'
one character less :-)
Jenda
===== [EMAIL PROTECTED] === http://Jenda.Krynicky.cz =====
When it comes to wine, women and song, wizards are allowed
to get drunk and croon as much as they like.
-- Terry Pratchett in Sourcery
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/