JPEG and Perl

Discussion in 'Perl Misc' started by CSUIDL PROGRAMMEr, Aug 30, 2005.

  1. 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
    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
    Thanks
    CSUIDL PROGRAMMEr, Aug 30, 2005
    #1
    1. Advertising

  2. CSUIDL PROGRAMMEr

    James Taylor Guest

    In article <>,
    CSUIDL PROGRAMMEr <> 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.
    James Taylor, Aug 30, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. lovaspillando
    Replies:
    0
    Views:
    1,025
    lovaspillando
    Aug 26, 2007
  2. Ivan Alameda Carballo
    Replies:
    0
    Views:
    490
    Ivan Alameda Carballo
    Aug 26, 2007
  3. Stefano Bettelli

    Request for comments on a JPEG metadata Perl module

    Stefano Bettelli, Jun 26, 2004, in forum: Perl Misc
    Replies:
    11
    Views:
    214
    Ben Morrow
    Jul 15, 2004
  4. CSUIDL PROGRAMMEr

    JPEG and Perl

    CSUIDL PROGRAMMEr, Aug 30, 2005, in forum: Perl Misc
    Replies:
    3
    Views:
    100
    Paul Lalli
    Aug 30, 2005
  5. Dilbert
    Replies:
    0
    Views:
    840
    Dilbert
    Nov 10, 2011
Loading...

Share This Page