in reply to Re: run away ?
in thread run away ?
If your going to change $/ use local $/ = "new value";.
Why?
I ask because this is one of those cases I struggle with. Sometimes I use local $INPUT_RECORD_SEPARATOR = "some string"; in Perl scripts (not modules), sometimes I don't. I feel like I should localize the variable, but doing so also seems inert. Why should I care about the scope that doesn't exist outside the universe of my standalone Perl script? Isn't local just needless noise here?
I should add that I usually set this built-in variable outside any blocks within my scripts unless I have a specific reason to do otherwise (and I usually don't).
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: run away ?
by GrandFather (Saint) on Nov 07, 2010 at 22:49 UTC | |
by Jim (Curate) on Nov 08, 2010 at 01:42 UTC | |
|
Re^3: run away ?
by kcott (Archbishop) on Nov 08, 2010 at 04:56 UTC |