>> Anyway, the difference has to do with newlines. Under Win32,
>> ActivePerl prints "\n" as "\r\n". Cygwin (depending on how
>> you have its filesystems configured) prints "\n" as "\n". Check
>> the size of your output files. For a two line file, I would
>> expect there is a 2 byte difference in size.
But does that explain why the .txt file and the .txt.bak file generate the
same checksum on W2K? Shouldn't the two checksums be different since the
bak file should contain the 'unchanged' file?
Running this example without the potential obfuscation of md5sum (since I
don't have that binary) demonstrates that on my W2K workstation, the strings
are not modified in either file with or without the /i case-insensitive
option.
Unless I'm missing something in the one-liner options, that's broken.
--Matt
> In Windows 2000 CMD.exe, with ActiveState Perl 5.6.1 Build 631
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> D:\>copy con testtextfile.txt
> This is this, that is that
> Thats all folks!
> ^Z
> 1 file(s) copied.
>
> D:\>perl -pi.bak -e 's/this/that/g' testtextfile.txt
>
> D:\>md5sum test*
> ca08d1da587bff5a25bb33f22fa62df7 *testtextfile.txt
> ca08d1da587bff5a25bb33f22fa62df7 *testtextfile.txt.bak
>
> D:\>rm *.bak
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Now, lets try that in Cygwin w/ it's perl v5.6.1...
>
> Administrator@PSIONIC /cygdrive/d
> $ perl -pi.bak -e 's/this/that/g' testtextfile.txt
>
> Administrator@PSIONIC /cygdrive/d
> $ md5sum test*
> 74d5c5e10b51b882fa5438a4f99cc111 *testtextfile.txt
> ca08d1da587bff5a25bb33f22fa62df7 *testtextfile.txt.bak
>
> Administrator@PSIONIC /cygdrive/d
> $
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
_______________________________________________
ActivePerl mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs