On Dec 10, 2007 6:58 PM, Henrik Nielsen <[EMAIL PROTECTED]> wrote:
> Hi
>
> I'm almost totally new to Perl! :-)
> I need to write a program that search a CDR file for duplicate lines and
> then delete them.
>
> This is what I have found out by reading in the Perl documentation and
> this newsgroup, but I need a little more help.
>

Follow the script you provided, you just need to change two lines for
your new requirement.

change:

>       my $key = join ',', ( split /,/ )[ 2, 3, 6, 7 ];
>       print $out $_ unless $hash{ $key }++;

to:

print $out $_ unless $hash{$_}++;


Good luck.

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


Reply via email to