I have been running I/O scripts for years, and never ran across this little bug...
When parsing in an entire file using a while loop, I fill different variables based on different REGEXPs. The problem arises when one of my REGEXPs is not perfect, and fills a variable with nothing... causing an invalid concatenation error, but not just for that line... for EVERY line...
The problem is not so mush that I need to fix the errors, but I am parsing a 485,679 line file, generating ~2000 errors per second in my Apache error_log file... which incidentally I do not have permission to modify/delete... at that rate, debugging my REGEXPs fills up MBs fast.
hehehe... last week, before I found out about this, I blew away a 900 MB chunk of error_log...
SO..... is there some way I can just kill the while loop on ANY error, so that I don't write more than one error to the error_log???





Bookmarks