Beefy Boxes and Bandwidth Generously Provided by pair Networks Cowboy Neal with Hat
Just another Perl shrine
 
PerlMonks  

Re: non-global $/

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

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


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
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.