http://www.perlmonks.org?node_id=572295


in reply to Re^4: CGI-Perl:: Location for saving the GD output
in thread CGI-Perl:: Location for saving the GD output

What about binmode STDOUT? Further observations:

Try this:

#!/usr/bin/perl -w use CGI; my $query = new CGI; binmode STDOUT; print $query->header(-content_type => 'image/x-png'); open (I, '<', "/tmp/upload/EMBOSS_001.png"); binmode I; print while <I>; close I;

Does that work?

--shmem

_($_=" "x(1<<5)."?\n".q·/)Oo.  G°\        /
                              /\_¯/(q    /
----------------------------  \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}