Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^2: paragraph mode and <DATA>

by ikegami (Patriarch)
on Mar 13, 2011 at 05:56 UTC ( [id://892905]=note: print w/replies, xml ) Need Help??


in reply to Re: paragraph mode and <DATA>
in thread paragraph mode and <DATA>

I noticed it had DOS/Windows line endings (\r\n). I notice that if you remove the carriage returns, it works just fine:

Or run it on Windows.

******************** hello world bye ******************** ******************** hello world2 bye2 ******************** ******************** end ********************

Replies are listed 'Best First'.
Re^3: paragraph mode and <DATA>
by roboticus (Chancellor) on Mar 13, 2011 at 06:11 UTC

    ikegami:

    I did the whole song and dance because it's not enough to simply run it on Windows. When I reproduced it, I was running on Windows Vista. While the most common Windows builds (ActiveState & Strawberry) wouldn't have given this problem, there are builds (such as the one I use, cygwin) which act more like a unix version.

    Since I use an editor that doesn't add "\r" to the line ends, I don't normally encounter this issue, but I've encountered it a few times, and am sensitized to look for it.

    ...roboticus

    When your only tool is a hammer, all problems look like your thumb.

      cygwin isn't windows -- you can run it on windows, but you know its unix emulation, not windows

        While it does provide many of the unix capabilities, it's still Windows. (Think of it as Windows++). It gives you many of the advantages of unix, and it doesn't preclude you from using the Windows capabilities. Around here, it's a commonly used perl on Windows boxes, even for people not running bash, vim and such.

        ...roboticus

        When your only tool is a hammer, all problems look like your thumb.

      I have no idea why you're claiming that a programs running in a unix emulator (e.g. cygwin) is running on Windows, or what your point you're trying to make in the process.

      Since I use an editor that doesn't add "\r" to the line ends, I don't normally encounter this issue, but I've encountered it a few times, and am sensitized to look for it.

      Indeed. Windows and unix use different line endings for text files. One must account for that when accessing a from the other system (be it via FTP, SMB or Cygwin).

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://892905]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (9)
As of 2024-04-26 08:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found