johnny_carlos has asked for the wisdom of the Perl Monks concerning the following question:
Hola Monks,
I've been pulling my hair out for quite a while(more time than I want to admit) trying to figure out why this:
I still don't know what the problem is, but my fears were alleviated when I expanded my minimalist test case to this:
So whats the deal? Anyone know why single character variable names slip through the cracks under the use strict pragma?? Or am I not seeing something?
Thanks!
John
I've been pulling my hair out for quite a while(more time than I want to admit) trying to figure out why this:
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;
I still don't know what the problem is, but my fears were alleviated when I expanded my minimalist test case to this:
...and this works like it should, dying a horrible, miserable death.use strict; $aaa++; print $aaa;
So whats the deal? Anyone know why single character variable names slip through the cracks under the use strict pragma?? Or am I not seeing something?
Thanks!
John
|
---|
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 |
Back to
Seekers of Perl Wisdom