On Sun, Jun 21, 2009 at 11:37 PM, David Fetter <david@fetter.org> wrote:
On Sun, Jun 21, 2009 at 10:36:04PM +0530, Gurjeet Singh wrote: > On Sat, Jun 20, 2009 at 2:06 AM, Alvaro Herrera > <alvherre@commandprompt.com>wrote: > > > About the comment in chomp: did you try to use different values of $/? > > > > > Well, now that I have tried it, yes, setting $/ to '\r\n' does give me what > I expected. Both expected and result files should have the same kind of line > endings though.
Why would \r\n be in our code base anyhow?
I am not implying or expecting that we have \r\n in our test suite.
Its just that maybe my mail client introduced \r\n while downloading the old attachments, or probably my quite capable Notepad++ converted these files from \n to \r\n! I am not too sure. But it sure cost me a few cycles to realize that the files I copied from my Windows host to my Fedora VM were just not the thing perl would like.