Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: non-global $/

by tlm (Prior)
on Jun 22, 2005 at 14:11 UTC ( [id://469026]=note: print w/replies, xml ) Need Help??


in reply to non-global $/

I expected that $/ would be package specific, it doesnt seem to be,
...is there a way to alter the behaviour of $/ to make it package specific?

From 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
In particular, the new special "${^_XYZ}" variables are always taken to be in package "main", regardless of any "package" declarations presently in scope.

the lowliest monk

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (3)
As of 2024-04-19 01:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found