Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Re: to avoid redundacy in a file

by Purdy (Hermit)
on Jul 15, 2002 at 15:00 UTC ( #181801=note: print w/replies, xml ) Need Help??


in reply to Re: to avoid redundacy in a file
in thread to avoid redundacy in a file

This won't do exactly as the AM wants - some lines will be duplicate to the user, but not to Perl:
$ more file.txt N AB TX NC AB N TX NC FOO BAR N AB TX NC $ perl test.pl file.txt N AB TX NC AB N TX NC FOO BAR

The first two lines of the file.txt file are "the same" to the user, but not to your program. zejames' solution works to the AM's needs, as it creates an unique key for the hash, based on the AM's definition of a duplicate.

Jason

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://181801]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (5)
As of 2019-11-16 22:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Strict and warnings: which comes first?



    Results (85 votes). Check out past polls.

    Notices?