"Dr.Ruud" schreef:
> beast:
>> a 100
>> a 102
>> ...
>> c 100
>> a 102
>> ...
>>
>> I would like to have a list (either array or hash) with unique line .
>
> perl -ne'$_{$_}||=print' datafile
Jason Roth's version:
perl -ne'$$_||=print' datafile
> or
>
> perl -pe'$_ x=!$$_++' datafile
--
Affijn, Ruud
"Gewoon is een tijger."
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
