Thank you for being a valued part of the CNET community. As of December 1, 2020, the forums are in read-only format. In early 2021, CNET Forums will no longer be available. We are grateful for the participation and advice you have provided to one another over the years.

Thanks,

CNET Support

Question

Problem with displaying image using perl cgi

Nov 14, 2013 11:40AM PST

Hi,
I am trying to display image , but its not working. I am using windows 7 and Active perl.
Code
#!C:/Perl64/bin/perl.exe
print "Content-type: image/gif\n\n";
print <<EOF;
<HTML>
<HEAD>
<TITLE> Coding Page </TITLE>
</Head>
<BODY>
<P>Image uploading

<a href="/cgi-bin/image.cgi?image=create_form.gif">
<a href="/cgi-bin/image.cgi?image=en.gif">
</BODY></HTML>

EOF
exit;

I have tried image sourse tag also.
Code
#!C:/Perl64/bin/perl.exe





print "Content-type: image/gif\n\n";
print <<HTML;
<html>
<head>
<title> A Simple Perl CGI </title>
</head>
<body>
<img src="en.jpg" width="225" height="225" />
<h1>A Simple Perl CGI </h1>
</body>
HTML
exit;

Can somebody guide me with this problem.

Zulfi.

Discussion is locked