in reply to Tricking a filename argument to use STDOUT

It sounds to me like the web server saw the image (since it gave you an error message containing part of the image), and the only way it could have seen the image is if it had been sent to STDOUT. Maybe you need to flush the header first?

print "Content-type: image/gif\nExpires: 0\n\n"; { my $af=$|; $|=1; $|=$af; } # Flush output. $rrd->graph( image => "-", vertical_label => 'My Salary', draw => { thickness => 2, color => 'FF0000', legend => 'Salary over Time', }, );

Replies are listed 'Best First'.
Re^2: Tricking a filename argument to use STDOUT
by fapestniegd (Initiate) on Jun 28, 2005 at 13:52 UTC
    The output needed to be flushed. It was printing the content header in the middle of the image. Thanks to everyone who replied. Special thanks to ikegami.