Soldato
- Joined
- 16 May 2008
- Posts
- 2,579
- Location
- Bristol
I am passing a Java object out of an applet via ObjectOutputStream to a perl cgi script, which then takes the object and writes it to a file.. Well that's what it should do.
The perl is adding a random 0d carridge return where there is a line-feed. So instead of it writing 0A it writes 0D 0A.
This is my script:
I've tried adding chomp($_) and chop($_) but these just remove both the new line and the carriage return..
The perl is adding a random 0d carridge return where there is a line-feed. So instead of it writing 0A it writes 0D 0A.

This is my script:
#!\Perl64\bin\perl.exe
open OUTPUT, ">/Program Files (x86)/Apache Software Foundation/Apache2.2/htdocs/test.data";
while(<STDIN>)
{
print OUTPUT "$_";
}
close OUTPUT;
I've tried adding chomp($_) and chop($_) but these just remove both the new line and the carriage return..