Re: JPEG and Perl
"CSUIDL PROGRAMMEr" <syedamjad_a@xxxxxxxxx> 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
>
> #!/usr/bin/perl
use strict;
use warnings;
> print "Content-type:image/jpeg\n\n";
use CGI;
> print " </html>";
> print "<body>";
> print " <IMG SRC='emb.jpeg'> " ;
> print "</body>";
> print"</html>";
> Is it right or am i missing something
If your Content-Type is a jpeg image, why are you sending out HTML?
--
John Small Perl scripts:
http://johnbokma.com/perl/
Perl programmer available:
http://castleamber.com/
Happy Customers:
http://castleamber.com/testimonials.html
.
Relevant Pages
- Re: Walking a tree and extracting info... Problems
... Learn to use the Perl debugger and to use the ... foreach $file (@thefiles) { ... push @lines, $_; # push the data line onto the array ... Perl has allocated "@lines" once for the whole program; when you process the next file in the directory you push the lines on the bottom; the match for the HTML title then fires every time. ... (comp.lang.perl.misc) - Re: JPEG and Perl
... > All I want to do is to display a image on my html page using perl. ... about how CGI and HTML works. ... (comp.lang.perl.misc) - Re: HTTP Filtering and Threads...
... You are trying to parse HTML with regular expressions. ... This is not Perl. ... # Some irrelevant code stuff... ... foreach $userID { ... (comp.lang.perl.misc) - Re: Problem in displaying an HTML page
... > Perl in backend & has frontend designed in HTML. ... So you're asking a bunch of Perl programmers why a web page of yours ... doesn't display completely on the first try. ... (comp.lang.perl.misc) - RE: question
... well it's really HTML that's the problem. ... > was whether perl was appropriate, not how to do it in perl. ... > this e-mail message or disclose its contents to anybody else. ... > should check this e-mail and any attachments for viruses. ... (perl.beginners) |
|