Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: non-global $/

by hanenkamp (Pilgrim)
on Jun 22, 2005 at 13:44 UTC ( [id://469013]=note: print w/replies, xml ) Need Help??


in reply to non-global $/

I'm not certain why you need this, but here's the deal. The $/ is a global variable. Adding the local before setting $/ to "Foo" makes it local to that block and anything you call from that block. The only way I know of to make a global "package specific" is to locally reset it to your desired package version at the start of every method (again using the local keyword.

Personally, I tend to just avoid the globals whenever I can.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (5)
As of 2024-04-18 00:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found