Bug In Mount?, Was [Odd/New Perl Behavior]

Josh Schulte jschulte@equilibrium.com
Wed Jan 24 15:26:00 GMT 2001


Reading my previous message below may provide a little more information,
but basically what is happening is I am getting \r\n at the end of my
lines in my files wether or not the directory is mounted in textmode or
binmode. Is there a bug in mount/cygwin?
Below are a perl script and results to illustrate the problem.
DOS INSTALL RESULTS
-------------------
$ mount
Device Directory Type Flags
C:\cygwin\bin /usr/bin system textmode
C:\cygwin\lib /usr/lib system textmode
C:\cygwin / system textmode
$ ./testperl
<-*>line one
<-*>line two
<-*>line three
UNIX INSTALL RESULTS
--------------------
$ mount
Device Directory Type Flags
C:\cygwin\bin /usr/bin system binmode
C:\cygwin\lib /usr/lib system binmode
C:\cygwin / system binmode
$ ./testperl
<-*>line one
<-*>line two
<-*>line three
PERL SCRIPT
-----------
#!/usr/local/bin/perl
@what = split(/\n/, `cat contents`);
foreach $line (@what)
{
	print "***>$line<-\n";
}
CONTENTS OF FILE
----------------
line one
line two
line three
Thanks,
Josh
-----Original Message-----
From: Josh Schulte 
Sent: Tuesday, January 23, 2001 5:24 PM
To: cygwin@sources.redhat.com
Subject: Odd/New Perl Behavior (Bug In Perl?)
I haven't upgraded cywgin for 6 months now. And now that I did I am
having some problems with my old perl scripts. It appears split used to
use \n as \r\n and put just the lines of text in the array elements. But
now perl is storing the lines and a \r. I wrote a sample script to
illustrate the problem. Notice how the first two stars in the line are
overwritten by the -> at the end of the print statement.
Is this expected behavior or is there a bug in Perl for cygwin? It
certianly doesn't seem desierable because the same script run on unix
and cygwin will produce different results.
I am using the perl-5.6.1-1.tar.gz. Cygcheck results are at the bottom
if that is useful for anybody.
Thanks for any help,
Josh
PERL SCRIPT
-----------
#!/usr/local/bin/perl
@what = split(/\n/, `cat contents`);
foreach $line (@what)
{
	print "***>$line<-\n";
}
CONTENTS OF FILE
----------------
line one
line two
line three
OUTPUT OF SCRIPT
----------------
josh_schulte@EQ5386JS /eq> testperl
<-*>line one
<-*>line two
<-*>line three
CYGCHECK -S RESULTS
-------------------
Cygnus Win95/NT Configuration Diagnostics
Current System Time: Tue Jan 23 17:20:26 2001
WinNT Ver 5.0 build 2195 
Path:	/usr/local/bin
	/usr/bin
	/bin
	/c/WINNT/system32
	/c/WINNT
	/c/WINNT/System32/Wbem
	/c/PROGRA~1/Tcl/bin
	/c/Program Files/InstallShield/InstallShield 5.5 Professional
Edition/Program
	/c/Program Files/Intel/Compiler4.0/bin
	/c/PROGRAM FILES/INTEL/COMPILER2.4/bin
	/c/Program Files/Intel/VTune40
	/c/Program Files/Microsoft Visual Studio/Common/Tools/WinNT
	/c/Program Files/Microsoft Visual Studio/Common/MSDev98/Bin
	/c/Program Files/Microsoft Visual Studio/Common/Tools
	/c/Program Files/Microsoft Visual Studio/VC98/bin
	/c/jdk1.2.2/bin
	.
	/eq/Tools/common/bin
	/eq/Tools/win386/bin
SysDir: C:\WINNT\System32
WinDir: C:\WINNT
PWD = `/eq'
USER = `josh_schulte'
MAKE_MODE = `unix'
HOME = `/home/josh_schulte'
Use `-r' to scan registry
a: fd N/A N/A 
b: net NTFS 95942Mb 35% CP CS UN PA FC Development
c: hd NTFS 19085Mb 30% CP CS UN PA FC 
d: cd N/A N/A 
e: net NTFS 27188Mb 52% CP CS UN PA FC 
s: unk N/A N/A 
C:\development\Tools\win386\..\.. /eq user textmode
C:\cygwin\bin /usr/bin system binmode
C:\cygwin\lib /usr/lib system binmode
C:\cygwin / system binmode
c: /c user textmode
d: /d user textmode
Found: C:\cygwin\bin\bash.exe
Found: C:\cygwin\bin\cat.exe
Found: C:\cygwin\bin\cpp.exe
Found: C:\cygwin\bin\find.exe
Found: C:\cygwin\bin\gcc.exe
Found: C:\cygwin\bin\gdb.exe
Found: C:\cygwin\bin\ld.exe
Found: C:\cygwin\bin\ls.exe
Found: C:\cygwin\bin\make.exe
Found: C:\cygwin\bin\sh.exe
 56k 2000年12月03日 C:\cygwin\bin\cygbz21.0.dll
 45k 2000年12月07日 C:\cygwin\bin\cygform5.dll
 18k 2000年10月23日 C:\cygwin\bin\cyggdbm.dll
 17k 2000年11月30日 C:\cygwin\bin\cyghistory4.dll
 14k 2000年10月23日 C:\cygwin\bin\cygintl.dll
 81k 2000年12月05日 C:\cygwin\bin\cygitcl30.dll
 35k 2000年12月05日 C:\cygwin\bin\cygitk30.dll
 45k 2000年10月22日 C:\cygwin\bin\cygjbig1.dll
 119k 2000年10月23日 C:\cygwin\bin\cygjpeg6b.dll
 26k 2000年12月07日 C:\cygwin\bin\cygmenu5.dll
 159k 2000年12月07日 C:\cygwin\bin\cygncurses++5.dll
 225k 2000年12月07日 C:\cygwin\bin\cygncurses5.dll
 15k 2000年12月07日 C:\cygwin\bin\cygpanel5.dll
 162k 2000年10月23日 C:\cygwin\bin\cygpng2.dll
 108k 2000年11月30日 C:\cygwin\bin\cygreadline4.dll
 390k 2000年12月05日 C:\cygwin\bin\cygtcl80.dll
 5k 2000年12月05日 C:\cygwin\bin\cygtclpip80.dll
 10k 2000年12月05日 C:\cygwin\bin\cygtclreg80.dll
 243k 2000年10月23日 C:\cygwin\bin\cygtiff3.dll
 623k 2000年12月05日 C:\cygwin\bin\cygtk80.dll
 41k 2000年11月20日 C:\cygwin\bin\cygXpm-noX4.dll
 45k 2000年11月20日 C:\cygwin\bin\cygXpm-X4.dll
 49k 2000年10月23日 C:\cygwin\bin\cygz.dll
 611k 2000年12月25日 C:\cygwin\bin\cygwin1.dll
 Cygwin DLL version info:
 dll major: 1001
 dll minor: 7
 dll epoch: 19
 dll bad signal mask: 19005
 dll old termios: 5
 dll malloc env: 28
 api major: 0
 api minor: 31
 shared data: 3
 dll identifier: cygwin1
 mount registry: 2
 cygnus registry name: Cygnus Solutions
 cygwin registry name: Cygwin
 program options name: Program Options
 cygwin mount registry name: mounts v2
 cygdrive flags: cygdrive flags
 cygdrive prefix: cygdrive prefix
 cygdrive default prefix: 
 build date: Mon Dec 25 12:39:48 EST 2000
 shared id: cygwin1S3
Use -h to see help about each section
--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple
--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple


More information about the Cygwin mailing list

AltStyle によって変換されたページ (->オリジナル) /