Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister

Re: Comparing strings from different files (merge)

by tye (Sage)
on Oct 08, 2013 at 19:54 UTC ( #1057454=note: print w/ replies, xml ) Need Help??

in reply to Comparing strings from different files

The suggestions to use a hash don't seem sound to me as it looks like you have plenty of records with duplicate "labels". But perhaps there is a unique identifier in there that you are aware of but haven't clearly told us about and a hash would work (if the files easily fit in RAM).

I would instead sort each file and then do a classic "merge" algorithm between the two sorted files. How to sort the files will require more knowledge about the structure and content than I can deduce from just the example data you have posted.

- tye        

Comment on Re: Comparing strings from different files (merge)

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (14)
As of 2015-11-25 13:01 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (675 votes), past polls