in reply to No errors listed

I think that I have actually seen this a few times, "BEGIN not safe" with no previous error printed, perhaps when playing with redirections although I don't remember the exact conditions under which this happened. The successful solution has been to first compile the code with the -c option:
$ perl -c my_script.pl
and then the compile error would be printed.

Replies are listed 'Best First'.
Re^2: No errors listed
by SimonPratt (Friar) on Oct 30, 2014 at 10:43 UTC

    Yeah, I think I recall seeing something similar, however your BEGIN not safe message will still give you a line number at the point compilation failed, which you can be reasonably sure is either the point of failure, or the line immediately after the point of failure (probably dependant on how many instructions you are in the habit of piling onto individual lines)

      No really it does not. No line number other than the ones in Carp. Not my code.