It seems that this process will quickly become very slow an inefficient. I would suggest that you read your data into a database and then process your output as part of an SQL query. I have to do similar lookups (customer names against sales force records) against thousands of records with my application and having to read account information from one text file and then read and search against another text file would take much more effort, then to read the two source files into a database (SQLite or MySQL) and then run a simple join query and output the results...
In my application I can read in 10K sales records into my database in about 2 minutes, read in the customer data (1,000,000 records) in about 5 minutes, execute the data merge and output the results in about 5 minutes.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
| & || & |
| < || < |
| > || > |
| [ || [ |
| ] || ] ||