Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Message-ID: <3B7617FA.6020209@ece.gatech.edu> Date: Sun, 12 Aug 2001 01:45:30 -0400 From: Charles Wilson User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.2) Gecko/20010713 X-Accept-Language: en-us MIME-Version: 1.0 To: Adam Breier CC: cygwin AT cygwin DOT com Subject: Re: perl inclusion with cygwin References: <3B76067B DOT 7BC340DC AT uclink4 DOT berkeley DOT edu> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Adam Breier wrote: > > I started getting strange results from a script that worked fine on > another machine, and after much puzzling I figured out that for > some reason on the new machine some lines (but not all) of the > input file was being considered to have \r\n line termination, > whereas in all the programming I've done under windows 95/98/NT, > I've assumed with no problem that there's only a \n and a single > chop command is sufficient to get rid of it. What was really > puzzling was that if I ran the script as ./scriptname.pl, it worked > fine (it was using the activestate perl I have installed--build > 628, v5.6.1) but if I ran it as perl scriptname.pl (which used the > cygwin perl), bad things happened because there were \r characters > floating around where there shouldn't be. > > So that was a pain. My suggestion to you is that if you are going > to include perl with cygwin, please include the activestate > version; Not gonna happen. The ActiveState perl doesn't grok cygwin paths, and is just not unix-like in a lot of ways. Besides, why would we include a non-cygwin binary in a cygwin distribution? (also, you can just choose not to install "our" version and use AS instead). > I don't know where the one you used came from, but it is > my impression that activestate is the standard for use in windows > environments A-hah! But cygwin is not windows. > (it is certainly the one endorsed by www.perl.com), Sure. for "raw" W95, W98, WMe, WNT, W2K. But they don't mention cygwin -- because cygwin is not really windows. > and a difference in behavior in something as important as line > termination will probably throw a lot of windows perl programmers > if they give cygwin a try. Well, there's actually a LOT of things that may throw windows programmers if they jump over to cygwin (or linux, for that matter). But that's a whole 'nother story. If there is a line ending problem with cygwin-perl (and there is), then it needs to be fixed, and we want to fix it. Unfortunately, the cygwin-perl volunteer maintainer is MIA right now. in the interim, a fix is to mount your drives in "text mode" or "DOS mode" instead of "binary mode/Unix mode". (Run setup, click "DOS", but don't install anything). Another fix is to convert your .pl files to unix line endings. ASperl will grok those, AFAIRC. And cygwin-perl will be happy. And every text editor on the planet (except notepad) can understand both types of line endings. If you're using notepad to edit your perl scripts...see a shrink. :-) --Chuck -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/