These scripts (separated by "**********") all run for me with no errors if I run them with perl -w: ********** my $x; ********** my $x; $x = 2; ********** my $x; $x = 2; ++$x; ********** I got no errors running these with "perl -w" using either ActivePerl build 623 of perl 5.6.0, or perl 5.005_03 for BSD/OS. I added "use strict;" to the top of each script and still got no warnings running them with perl -w. Can you post an example of a script that gives a warning if you run it under "perl -w", due to a variable only being referenced once? At 05:05 PM 2/20/01 -0500, Carl Jolley wrote: >I repeat my comment, the -w flag warns if a variable is >only referenced once. Apparently declaring a variable >and never referencing it is OK. Referenced means a variable >is used or modified. Defined is different from declared. >A variable that is declared but never refernced is undefined >or to rephrase it, it is not defined. In order for a variable >to become defined it must be referenced. Perl warns you (under >the -w flag) if a variable is referenced once. Perl will not >warn if a subroutine is "declared" and never used or even if >it is only used once. Perl will not warn you if a subroutine >is used but is never defined. That's because perl has the >AUTOLOAD mechanism that permits dynamic subroutine definition. > >**** [EMAIL PROTECTED] <Carl Jolley> >**** All opinions are my own and not necessarily those of my employer **** > > >_______________________________________________ >Perl-Win32-Users mailing list >[EMAIL PROTECTED] >http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users > > [EMAIL PROTECTED] http://www.peacefire.org (425) 649 9024 _______________________________________________ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users