in reply to Re: Re: Redefining chomp()
in thread Redefining chomp()
protect the global state of $/ and let you deal with changing it's behavior right before the chomp. The scope could be increased until you've captured all of your chomp calls. Any new chomps you write, unless they're in the same scope as the local call would use the default value of $/{ local $/ = "\n\r"; chomp; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Re: Redefining chomp()
by biosysadmin (Deacon) on Mar 24, 2004 at 17:49 UTC |