Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: file merge with config(parameter) files

by moritz (Cardinal)
on Mar 02, 2013 at 13:47 UTC ( #1021413=note: print w/ replies, xml ) Need Help??


in reply to file merge with config(parameter) files

due to this, need your help whether we can use perl (using hash) for merging files or using sql database (pl sql) to make it faster.

It should be quite possible to do it perl. Keep the config file and the relevant parts of the smaller file (file2) in memory, and process the larger file (file1) line by line.

Of course you can do it in SQL too. If the records already exists in a database, that's probably a simpler approach. If not, importing it likely takes as long as doing the whole processing in Perl.


Comment on Re: file merge with config(parameter) files
Replies are listed 'Best First'.
Re^2: file merge with config(parameter) files
by hyans.milis (Novice) on Mar 02, 2013 at 15:07 UTC

    Hi Moritz,

    my idea is to process 1st file line by line. may i know what's the meaning to store the smaller file (file2) in memory ?is there any sample about this? bcoz i'm newbie in perl. thanks

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1021413]
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: (12)
As of 2015-07-31 11:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (276 votes), past polls