I think you're slightly confused about what these error messages mean. If you don't declare a variable, you'll get the "requires explicit package name" error. This is triggered by use strict, not by -w.
$ perl -Mstrict -le 'print $x' Global symbol "$x" requires explicit package name at -e line 1. Execution of -e aborted due to compilation errors.
The error we're dicsussing here is seen whenever you try to print a variable that contains "undef" (even if it's previously been declared). This is triggered by -w (or use warnings).
--$ perl -Mstrict -w -le 'print my $x' Use of uninitialized value in print at -e line 1.
"The first rule of Perl club is you do not talk about
Perl club."
-- Chip Salzenberg
In reply to Re: Re: The -w switch on a web application
by davorg
in thread The -w switch on a web application
by Heidegger
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |