in reply to Out of Memory Error : V-Lookup on Large Sized TEXT File
I'd second GotToBTru on the file open/close thing.
I had expected to see you slurping the files, but you only slurp the file containing the list of files to examine, so that's not it.
Definitely need to close $FDH (>>$OUTPUTFILE) inside the same braces where it's opened. I'd be concerned about you possibly causing unexpected buffering, especially as you continually re-open it.
Nothing else jumps out at me -- but then, it seems pretty evident you have quickly typed psuedo-Perl and not shown us your actual code. One small typo in your actual script could cause the issue and be completely hidden in this summarization.
I'd suggest moving the close to its proper location, and if the problem persists, post actual code demonstrating the problem (with such large data files, we'll probably have to forego the usual request for input data. Maybe a few lines as a sample?
|
|---|