On Mon, Mar 05, 2018 at 08:04:09PM +0000, RS wrote:

> It's worse than I thought.  I had got the impression from the perlport 
> perldoc that if replaced \n with \012 in a print statement I would get a 
> LF on its own in Windows.  I don't.  If I insert \015 I can have a CR on 
> its own, but \012 is still replaced with CR LF.
> This article
> http://www.perlmonks.org/?node=binmode
> says I can use binmode, so that may be an answer.  It's quite old, so it 
> may no longer apply.

binmode does still work AFAIK, but a more modern and flexible method is
to use the crlf I/O layer, which is documented here:

Note however that an awful lot of perl code just doesn't bother. Windows
is very much a second-class citizen in the perl world.

David Cantrell | Nth greatest programmer in the world

    If you can read this, thank a teacher.
    If you're reading it in English, thank Chaucer.

get_iplayer mailing list

Reply via email to