johnny_carlos has asked for the wisdom of the Perl Monks concerning the following question:
actually prints "1", when it *thought* it should give a compile-time error for not declaring $a. I felt as though I had witnessed the impossibe. For a while there I was questioning my entire existence, and my world was about to collapse since everything I've ever known to be real and true suddenly was not.use strict; $a++; print $a;
...and this works like it should, dying a horrible, miserable death.use strict; $aaa++; print $aaa;
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: use strict, strange behavior with single character variables
by perlplexer (Hermit) on May 09, 2002 at 22:13 UTC | |
Re: use strict, strange behavior with single character variables
by grep (Monsignor) on May 09, 2002 at 22:14 UTC | |
Re: use strict, strange behavior with single character variables
by Zaxo (Archbishop) on May 09, 2002 at 22:16 UTC | |
Re: use strict, strange behavior with single character variables
by Rex(Wrecks) (Curate) on May 09, 2002 at 22:19 UTC | |
Re: use strict, strange behavior with single character variables
by Anonymous Monk on May 09, 2002 at 22:23 UTC | |
Re: use strict, strange behavior with single character variables
by particle (Vicar) on May 09, 2002 at 22:28 UTC |