Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Scalar $ENV in a package

by cianoz (Friar)
on Oct 25, 2000 at 15:19 UTC ( #38327=note: print w/ replies, xml ) Need Help??


in reply to Scalar $ENV in a package

from "man perlvar"

       All Perl variables 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.  A few other names are also exempt:

               ENV             STDIN
               INC             STDOUT
               ARGV            STDERR
               ARGVOUT
               SIG
so adding
print "\$main::ENV = '$main::ENV'\n";
you get
$main::ENV = '2'
as expected...


Comment on Re: Scalar $ENV in a package
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://38327]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (7)
As of 2014-12-29 12:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (187 votes), past polls