Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: joined records from multiple csv

by Loops (Curate)
on Jul 07, 2015 at 17:11 UTC ( [id://1133577]=note: print w/replies, xml ) Need Help??


in reply to joined records from multiple csv

You're reading and parsing the second file for every record of the first. To speed things up, consider reading that file just once at the start. Put its contents into a hash variable based on the field you wish to join, ie. sap_id. Then as you read each record of the first file, you can very quickly access the data without going back out to the disk file. As an aside, you might want to consider some of the CPAN modules for handling CSV files.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (3)
As of 2024-04-26 00:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found