http://www.perlmonks.org?node_id=565155


in reply to Re^2: More Misleading Compiler Error Messages
in thread More Misleading Compiler Error Messages

It doesn't realize the warning is related to the syntax error. Given

my $s = shift . '!'; $s+++;

the compile will issue both a warning (Warning: Use of "shift" without parens is ambiguous) and a syntax error (syntax error). As far as perl was concerned, it was the same situation with your code.

Missing and extraneous closers (closing quotes, closing curlies, closing brackets, etc) are notoriously noisy errors. If you get a lot of unusual errors/warnings, chances are that's your problem.