in reply to open and print image

open(FH, '<', 'images/logo.gif') or die $!; local $/ = undef; my $content = <FH>; close(FH); binmode STDOUT; print "Content-type: image/gif\n\n"; print $content; exit(0);

Replies are listed 'Best First'.
Re^2: open and print image
by Anonymous Monk on May 30, 2009 at 14:31 UTC
    That worked, thanks! I didn't even think of loading the file to a string/array then printing it out after as opposed to printing it byte by byte. Thanks!