Ellhar:
If I had to guess, I'd suspect that your program is taking a long time to execute, and you're not letting it run to completion. Instead, you might be monitoring the file size and worry .... "Hmmph! My program isn't doing anything. Perhaps it's in an infinite loop?" and killing it. Since it hasn't written anything to the file, it remains empty.
If that's the case, then you're probably suffering from buffering and should turn buffering off on the output file so that each line is written to the output file as it's printed in your program.
...roboticus
Update: I guess I could've mentioned a couple of solutions... You could pepper your code with calls to flush (e.g. SUMMARY->flush() to write the output to disk immediately. But then you'd have to use IO::Handle; at the start of your program and manually insert all those calls. A better way would be to tell the filehandle to flush itself on every print/write statement. You can do this by adding SUMMARY->autoflush(); just after your open statement. You'll still need the use IO::Handle; at the beginning though. Read perldoc perlvar for more details.
|