Problems? Is your data what you think it is? | |
PerlMonks |
Error when running on larger filesby K_Edw (Beadle) |
on Jun 28, 2016 at 08:36 UTC ( [id://1166729]=perlquestion: print w/replies, xml ) | Need Help?? |
K_Edw has asked for the wisdom of the Perl Monks concerning the following question: I have a small snippet of code which processes a tab-delimited .txt file 2 lines at a time:
When attempting to run this on larger .txt files (>4,000,000 lines), I receive the following errors often near the end of the file but >50 lines from it):
Printing $. confirms that the script simply terminates at this input file line and no further lines are read in. If the input file is sorted, the error occurs approximately in the same place but on a different line of content. There is nothing obviously wrong with the content of the file and all lines match expectations. However, if I split the input file into two halves - the script runs to completion without error. Am I hitting some sort of memory or hash limit? Is there a way to fix this without having to split the input file before processing? This was run on Perl 5.25.2 but also occurs on 5.24.0. The format of the input file is as such:
Back to
Seekers of Perl Wisdom
|
|