in reply to Sanity Check: Debugging Help Needed!
About the only thing that looks suspect to my eyes is that you are not checking the return code from open or close.
I can't think of situation in which an error in either would cause the open for append to blow away and overwrite the existing data, and this appears to be one possibility. Is the output you are seeing in Results.txt from the first file processed or the last?
If it is the last, that would suggest that the '>>' mode is being ignored somehow, which seems unlikely.
If the output is from the first file, that would tend to indicate that the subsequent attempts to re-open the file for append are failing for some reason. Which seems unlikely as you would be seeing lots of 'print() on unopened filehandle' messages--unless that use strict; migrated it way into the code just prior to posting :)
Either way, try adding so or die ...$!; clauses to the open and close calls and see what if anything that reveals.
As an aside, have you checked to see that you have enough disk space free? You could even add an or warn ...$!; clause to your print statements to check for disk full errors etc.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Sanity Check: Debugging Help Needed!
by Anonymous Monk on Aug 27, 2003 at 17:56 UTC | |
by BrowserUk (Patriarch) on Aug 27, 2003 at 18:36 UTC |