in reply to Using null filehandle
What lines are missing? Lines from the beginning of the file, from the end, or just random lines throughout?
Can you come up with a simpler testcase that demonstrates the problem? That will probably help you identify what's going on, and make it easier for people to help you.
Since apparently your data is showing up on the console but not in your file, it may be a buffering problem. Output to files is buffered, and if your program crashes or is killed instead of exiting normally, the last bit of the buffer may not get flushed properly. Try putting an explicit close statement at the end of your loop, check it's error return, and print that you've closed the file succesfully; that may help identify the problem.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Using null filehandle
by digger (Friar) on Jun 09, 2004 at 10:30 UTC | |
by sgifford (Prior) on Jun 10, 2004 at 18:39 UTC |