Re: JPEG and Perl



In article <1125424852.401765.228200@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
CSUIDL PROGRAMMEr <syedamjad_a@xxxxxxxxx> wrote:
>
> All I want to do is to display a image on my html page using perl.

Sorry, it is not clear why you need to use Perl to display an
image. Your code below has several problems, and I cannot guess
from reading it what you really want to do.

> Here is my code
>
> #!/usr/bin/perl

You should always use strict and warnings.

> print "Content-type:image/jpeg\n\n";

This looks like a CGI script that is about to supply JPEG data but
it then supplies HTML instead.

> print " </html>";

That end tag is out of place.

> print "<body>";

There is no doctype or head?

> print " <IMG SRC='emb.jpeg'> " ;
> print "</body>";
> print"</html>";
> Is it right or am i missing something

I don't think Perl is your problem. You need to understand more
about how CGI and HTML works. I suggest you ask in a group that
covers CGI (not this one). Try comp.infosystems.www.authoring.cgi.

--
James Taylor, London, UK PGP key: 3FBE1BF9
To protect against spam, the address in the "From:" header is not valid.
In any case, you should reply to the group so that everyone can benefit.
If you must send me a private email, use james at oakseed demon co uk.

.



Relevant Pages

  • Re: How to write to drive A: from CGI Perl
    ... >> If that does not look weird to you, then please go back to basics. ... Please (assuming that the quoted text is an actual excerpt from the HTML ... You will have a better version of Perl? ... for HTML or Perl or CGI or anything. ...
    (comp.lang.perl.misc)
  • Re: start_table problem
    ... Fabian Pilkowski wrote: ... and end_tag_name functions are not generated automatically when you use CGI. ... when using ActiveState's Perl all these informations are ... already available in HTML format. ...
    (comp.lang.perl.misc)
  • Re: [HELP] code modification
    ... Getting a program to run under CGI can be difficult, ... There is also more risk if the script involves sending e-mail or ... version of perl you are using. ... Investigate the CGI module for acquiring HTML form data. ...
    (comp.lang.perl.misc)
  • Beginners Program
    ... I had to work with 2 friends however and they have never seen perl, ... to convert HTML files into CGI. ... Thanks alot for your time. ...
    (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)