DreamT has asked for the wisdom of the Perl Monks concerning the following question:

Hi,
Is it possible to write Windows newlines with IO::File? And if so, how do I do it?

Replies are listed 'Best First'.
Re: IO::File - Windows crlf?
by ikegami (Patriarch) on May 03, 2010 at 15:15 UTC
    Perl adds the :crlf layer to handles by default on Windows. It converts "\n" to CRLF when writing (and vice-versa on reading), so all you need to do is print "\n".
Re: IO::File - Windows crlf?
by Anonymous Monk on May 03, 2010 at 14:05 UTC
      Worked like a charm:) Thanks!
Re: IO::File - Windows crlf?
by 7stud (Deacon) on May 03, 2010 at 14:20 UTC
    $out_file->syswrite("\r\n");