On 9/28/07, Jeremy Kister <[EMAIL PROTECTED]> wrote: > Given the below code, is there something that will warn/prevent me from > declaring $variable when i really meant @variable ? snip > package My::Example; > sub new { > return bless({}, shift); > } > sub go { > my $variable; > push @variable, 1; > return([EMAIL PROTECTED]); > } > 1; snip
The strict pragma is lexically scoped, so you need to use it again after the package statement. It is probably a good idea to turn on warnings as well. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/