When I get errors I put this code at the very beginning of the file (before anything else, including "use" statements) and run it again... It usually prints the error, which is invaluable in tracking down the issue...
BEGIN {
$| = 1;
open (STDERR, ">&STDOUT");
print qq~Content-type: text/html\n\n~;
}