$lines = 0; open (DATABASE, "$filename" || &ErrorMessage); while (sysread DATABASE, $buffer, 4096) { $lines += ($buffer =~ tr/\n//); } close(DATABASE); if ($lines == 0){ &NoReport; } sub NoReport { print "Content-type: text/html\n\n"; print< No Report

No information has been submitted for the report you have requested.

EOL exit; }