delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/01/21/09:12:40

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-ID: <400E8750.3060005@ieee.org>
Date: Wed, 21 Jan 2004 14:06:08 +0000
From: Jason Pearce <jason DOT pearce AT ieee DOT org>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6b) Gecko/20031208
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
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 
using PERLIO=crlf?


Jason





--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019