|
|
| 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.
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.
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||