In article <[EMAIL PROTECTED]>,
 [EMAIL PROTECTED] (Zeng Nan) writes:
>According to "Learning Perl", a variable name should be "a letter or 
>underscore, and then possibly more letters, or digits, or underscores."
>But why $000 or $0000 works?

As also said in "Learning Perl", you should declare all your variables
with 'my':

% perl -le 'my $000'
Can't use global $000 in "my" at -e line 1, at end of line
Execution of -e aborted due to compilation errors.

Doesn't look like it works to me.

"Learning Perl" also talks about the variable $_.  That doesn't
fit the pattern either.  But you can use it according to the
rules Perl has for it; you just can't declare it with 'my'
because it belongs to Perl, not you.

$000 is the same sort of animal.  Leave it alone, unless you
want to write deliberately obfuscated programs.

-- 
Peter Scott
http://www.perldebugged.com/
*** NEW *** http://www.perlmedic.com/

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to