Why do you always explicitly print to STDOUT? That's unnecessary unless you've used select to change the default output filehandle.
You need to re-read the sugggest that you were given. "action" is a parameter to your CGI program. Therefore you should have this:
print STDOUT "<IMG SRC=\"show_pic.cgi?action=showImage\">";
or (more idiomatically)
print qq(<IMG SRC="show_pic.cgi?action=showImage">);
Then within show_pic.cgi you can check for the value of the "action" parameter and take appropriate action (i.e. returning either the HTML page or the image).
--
<http://www.dave.org.uk>
"The first rule of Perl club is you do not talk about
Perl club." -- Chip Salzenberg
|