D
David Jaquay
I'm trying to get the following code to work. I'm using ActiveState
Perl 5.8.2, Tomcat 4.0.4 under Win2K, and using either Mozilla 1.5 or
IE 6. Running this script causes Perl to hang on the next to last
line, the 'print' line. (I moved the exit statement around to come to
this conclusion.) Running it from the command line appears to work
just fine, displaying the raw chars from the GIF.
It would seem from Googling that this is a FAQ, and that binmode is
the answer, but I've shuffed the binmode lines around to various
locations, and still get the same results, a hung perl.exe.
Any ideas as to what's going on? (And yes, I'm quite new to Perl.)
Thanks,
Dave
print("Content-type: Image/gif\n\n");
open(INFILE,'<d:\\sample.gif');
binmode INFILE;
undef $/;
my $img = <INFILE>;
close(INFILE);
binmode STDOUT;
print STDOUT $img;
exit;
Perl 5.8.2, Tomcat 4.0.4 under Win2K, and using either Mozilla 1.5 or
IE 6. Running this script causes Perl to hang on the next to last
line, the 'print' line. (I moved the exit statement around to come to
this conclusion.) Running it from the command line appears to work
just fine, displaying the raw chars from the GIF.
It would seem from Googling that this is a FAQ, and that binmode is
the answer, but I've shuffed the binmode lines around to various
locations, and still get the same results, a hung perl.exe.
Any ideas as to what's going on? (And yes, I'm quite new to Perl.)
Thanks,
Dave
print("Content-type: Image/gif\n\n");
open(INFILE,'<d:\\sample.gif');
binmode INFILE;
undef $/;
my $img = <INFILE>;
close(INFILE);
binmode STDOUT;
print STDOUT $img;
exit;