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.


Examine what is said, not who speaks.
"Efficiency is intelligent laziness." -David Dunham
"Think for yourself!" - Abigail
"Memory, processor, disk in that order on the hardware side. Algorithm, algoritm, algorithm on the code side." - tachyon