If you run this script on Windows:

use CGI;
print "hi\n";

and redirect the output to output.txt and open output.txt in Notepad, you
can see that the output became UNIX-style as a result of the "use CGI;"
directive -- the newline was output as a UNIX newline (0x0a) instead of a
Windows newline (0x0d0a).  Without the "use CGI;" line, newlines get output
normally.

However, if you add the lines to the script:
open(FILE, ">file.txt");
print FILE "hi\n";
close(FILE);

then a proper Windows-style newline gets written to file.txt; apparently
it's only redirected standard output that becomes UNIX-style.

I emailed the author about it.  I'll just workaround it when redirecting
output, unless anyone can see something I'm obviously doing wrong.

        -Bennett

[EMAIL PROTECTED]     http://www.peacefire.org
(425) 649 9024
_______________________________________________
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users

Reply via email to