Welcome aboard tlefcovitch, this is most likely a server issue (?) Doesn't do this in IE?
I don't play much with open source applications, always coding my own, but you could try this. It should really already be there.
Locate the portion of the script that outputs the response. You should see a print command.
print "first line of response";
Immediately before this line, add
If you can't locate it, you can put it at the top of the script, immediately following the shebang
This may or may not break something else, but shouldn't.
The only think I can think of is I seem to recall when working with Perl scripts in Windows based server environments, the content type header may not be required like it is on Linux. You might have one configured with that in mind and it's not generating content type headers, and the server is errantly generating the wrong, or no, headers.