Re: JPEG and Perl
- From: "Jürgen Exner" <jurgenex@xxxxxxxxxxx>
- Date: Tue, 30 Aug 2005 18:56:43 GMT
CSUIDL PROGRAMMEr wrote:
> Folks
> I am new to perl
> ALl want to do is to display a image on my html page using perl .
> Here is my code
As far as Perl is concerned some comments below
> #!/usr/bin/perl
You are missing
use strict;
use warnings;
> print "Content-type:image/jpeg\n\n";
> print " </html>";
> print "<body>";
> print " <IMG SRC='emb.jpeg'> " ;
> print "</body>";
> print"</html>";
> Is it right or am i missing something
Although technically there is nothing wrong with your Perl code (it will
print what you are telling it to print) I would replace the phletoria of
print statements with a single "here" document:
use warnings;
print <<EOT;
Content-type:image/jpeg
</html>
<body>
<IMG SRC='emb.jpeg'>
</body>
</html>
EOT
jue
.
- References:
- JPEG and Perl
- From: CSUIDL PROGRAMMEr
- JPEG and Perl
- Prev by Date: Re: Perldoc on the web
- Next by Date: Re: Perldoc on the web
- Previous by thread: Re: JPEG and Perl
- Next by thread: Re: JPEG and Perl
- Index(es):
Relevant Pages
|