Cant Display the image...

[email protected] (jeevs)
Newsgroups perl.beginners.cgi
Organization http://groups.google.com
Message-ID <[email protected]>
Hi All,

   I am using the GD::Graphs to generate a graph.
  I am storing the file on the server and then displaying the same. my
code looks like.

####
..
...
...
$gd = $graph->plot(\@data) or die $graph->error;

 open(IMG, '>file.png') or die $!;
 binmode IMG;
 print IMG $gd->png;

 print "<img src='file.png'>";

#######
yes i am creating a file in cgi directoy ..

but instead of the image just a square box is displayed ..
Do i need some configuration in apache or my i missing something in my
perl code

Thanks for the help in advance
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.