This is the mail archive of the
mailing list for the Cygwin project.
perl inclusion with cygwin
- To: cygwin at cygwin dot com
- Subject: perl inclusion with cygwin
- From: Adam Breier <breier at uclink4 dot berkeley dot edu>
- Date: Sat, 11 Aug 2001 21:30:51 -0700
I've been using cygwin for about a month as a shell for running perl scripts I've written under windows NT. I just started using a new computer, so yesterday I downloaded and installed the latest version of cygwin. Unbeknownst to me at the time, this includes a version of perl; looking back now, I
see that the install log says
For your reference, here's the "starting cygwin install" line so you know exactly when I did this and with what installer version.
2001/08/10 21:15:58 Starting cygwin install, version 126.96.36.199
Before I continue, I should mention that I think I've fixed everything, and I'm writing just to make a suggestion about the perl you're including, which I'll get to after I explain what happened.
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; 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 (it is certainly the one
endorsed by www.perl.com), 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.
In case you're wondering who I am, I'm a graduate student at UC Berkeley, and the scripts I'm writing are for analyzing DNA replication in the E. coli and yeast genomes.
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html