print bug
am 25.07.2007 18:05:36 von Jeff SadowskiI noticed a bug/"undesirable feature" in activeperl's print.
every time there is a \n activeperl's print prints \r\n
this might be ok for text but it replaces it in binary as well.
I was using a perl script to display a few images as a proxy
and it screws up the images.
use WWW::Mechanize;
my $m = WWW::Mechanize->new();
my $someimage="http://path/to/some/image.jpg";
$m->get($someimage);
my $data = $m->content;
my $contenttype=$m->ct;
print "Content-type: " . $contenttype . "\n\n";
print $data;
If I wanted a \r\n I could easily have added this if I wanted I think
this is a bad idea to be implemented in the print command.
_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs