This is the mail archive of the
mailing list for the Cygwin project.
Is PERLIO=crlf recommended for Perl 5.8.0-3 and up?
- From: Jason Pearce <jason dot pearce at ieee dot org>
- To: cygwin at cygwin dot com
- Date: Wed, 21 Jan 2004 14:06:08 +0000
- Subject: Is PERLIO=crlf recommended for Perl 5.8.0-3 and up?
I've been working through the past archives and discovered the change
made to the default of PERLIO as of perl 5.8.0-3. Setting PERLIO=crlf
solves my initial problems and all my scripts now run with the new
version of perl. So far so good, but I am not sure if I should set
PERLIO=crlf permanently in my environment or not.
I need my scripts work on either unix or windows cygwin systems, but not
on a mixture. For instance, Modelsim is one tool I process the output of
via perl scripts. If I am running on Unix, I run Modelsim on Unix and
perl on Unix. If I am running on Windows, I run Modelsim on Windows and
perl in Windows (via Cygwin of course). Now the Windows version of
Modelsim outputs crlf endings while the unix version has just the lf.
So it seems to me that setting PERLIO=crlf permanently on Windows is
*exactly* what I want, because then its behaviour matches Modelsim on
which ever platform I have selected to run on. I can process either
Modelsim output or output from another perl script on either platform
without though to the line endings. But the original release
announcement said this was not recommended.
I guess the alternative is to leave perl to access the files in binary
mode and then modify the perl scripts to detect and account for what
ever line ends it finds. Is that the recommended approach rather than
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html