in reply to Re: Use of $AUTOLOAD and strict
in thread Use of $AUTOLOAD and strict
That's wrong. The ones that have to be declared are the ones not in perlvar. For example, $^W does not have to be declared, but perl -e "$,=$\=$/; print keys %::" does not print it.
Update: the exact rule is in perlvar:
Perl identifiers that begin with digits, control characters, or punctuation characters are exempt from the effects of the "package" declaration and are always forced to be in package "main"; they are also exempt from "strict 'vars'" errors. A few other names are also exempt in these ways: ENV STDIN INC STDOUT ARGV STDERR ARGVOUT _ SIG
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Use of $AUTOLOAD and strict
by ikegami (Patriarch) on May 12, 2005 at 13:39 UTC | |
by fizbin (Chaplain) on May 12, 2005 at 14:32 UTC |