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).
In reply to Re^2: run away ?
by Jim
in thread run away ?
by toniax
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |