That did the trick.
The code where I found this problem spits a file as an attachment to the browser, kinda looks like this:
sub render_file {
my ( $x, %p ) = @_;
my $content = read_file( $p{name}, binmode => ':raw' );
print $content;
return Apache2::Const::OK;
}
nothing really complex. I didn't know $\ would affect the output of print, or rather, didn't know mod_perl would set it like blindluke says.
What really strikes me as odd now is the fact that the code hasn't changed in ages and no one had noticed it was broken...
You learn something new everyday. Thanks everyone! |