in reply to GD::Graph called from cgi-bin

First, this just theory - I haven't tried it! (I have done similar things but not this specific scenario.)

HTML will expect the value of the src attribute to be a resource which returns an image.

If your imageGen.cgi does something like:

my $gd = $graph->plot(\@data); print STDOUT $gd->gif;

I believe that should serve up the image as you want. (I note from the GD::Graph doco that you may need to use binmode - I didn't read it in any great detail.)

If this image represents some rapidly changing data, then creating images on the fly may be the way to go. However, I would consider the processing overhead of repeatedly generating the same image versus the storage overhead involved in creating it once and saving it.

-- Ken