in reply to Re^2: Type globs, strict, and lexical variables
in thread Type globs, strict, and lexical variables
you can't localize a variable that doesn't pre-exist, under strict.
That's not true. strict has nothing to do with local. For example,
perl -Mstrict -e "local $Package::foo"
give no error.
perl -Mstrict -e "local $foo"
gives an error, but so does
perl -Mstrict -e "$foo"
will this really work
Strict doesn't apply to globs (since they can't be declareds), so
perl -Mstrict -e "*foo"
and
perl -Mstrict -e "local *foo"
give no error.
|
|---|