in reply to Grokking Compile Error Messages
When you get a slew of errors and warnings all mixed together, you can reduce the clutter by disabling the warnings on the command line using -X option:
P:\test>type junk.pl #! perl -slw use strict; my( $a, @b, %c ); if 1 ) { my( $a, @b, %c ); } P:\test>perl -c junk.pl "my" variable $a masks earlier declaration in same scope at junk.pl li +ne 8. "my" variable @b masks earlier declaration in same scope at junk.pl li +ne 8. "my" variable %c masks earlier declaration in same scope at junk.pl li +ne 8. syntax error at junk.pl line 7, near "if 1" junk.pl had compilation errors. P:\test>perl -Xc junk.pl syntax error at junk.pl line 7, near "if 1" junk.pl had compilation errors.
This even seems to disable use warnings which is nice.
|
|---|