in reply to Problem reading image from perl cgi script

There are several "caveats" about the code:

This is how i'd write it, which doesn't mean it's right, but as recommendation:

#!C:\Progra~1\Perl\bin\perl use CGI; my $co = CGI->new(); open IMG, 'picture.jpg' or die $!; binmode IMG; binmode STDOUT; $/ = \ 256; #or bigger as you like it print $co->header('image/jpeg'); print while <IMG>; close IMG;

update: there's no strict and warnings in my code either, so don't use it without inserting them!

--
http://fruiture.de