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

Re: joined records from multiple csv

by Loops (Curate)
on Jul 07, 2015 at 17:11 UTC ( #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
Node Status?
node history
Node Type: note [id://1133577]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2021-04-10 22:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?