CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner: Re: [Tejas] Merging the data in two files using a hash: Edit Log



Laurent_R
Veteran / Moderator

Sep 3, 2014, 9:56 AM


Views: 41632
Re: [Tejas] Merging the data in two files using a hash

Hi Tejas, is your data sorted? It seems to be, but I don't understand fully how.

Update: the reason I am asking is that if the data is sorted one way or another in accordance with the comparison key, then you could read the files in parallel and remove the duplicates as you go. The good thing about this approach is that it will work for files of just about any size, irrespective of RAM size, and it will be much faster than a database approach. The downside is that it requires a bit of cleverness, or rather care and attention, to get the algorithm really right.


(This post was edited by Laurent_R on Sep 3, 2014, 10:21 AM)


Edit Log:
Post edited by Laurent_R (Veteran) on Sep 3, 2014, 10:20 AM
Post edited by Laurent_R (Veteran) on Sep 3, 2014, 10:21 AM


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives