in reply to Re^2: failure to generate report file
in thread failure to generate report file

Strange... when you run it, does it print that line to standard output? When I run your script, it looks like this...
$ perl -w temp18.pl found: 2 1168473601 133714761 found: 3 1168473601 595131400 found: 5 1168473602 595191883 found: 8 1168473604 006456768 found: 10 1168477626 133714761 REFS 133714761: occurrences at 1168473601 and 1168477626 $ cat report.2008-01-11.txt REFS 133714761: occurrences at 1168473601and 1168477626