Beefy Boxes and Bandwidth Generously Provided by pair Networks Cowboy Neal with Hat
The stupid question is the question not asked
 
PerlMonks  

cgi.pm images

by jackstraw (Initiate)
on Apr 09, 2002 at 19:13 UTC ( [id://157892]=perlquestion: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.

jackstraw has asked for the wisdom of the Perl Monks concerning the following question:

I am trying to insert an image into a cgi script with little of no success.help novice

Replies are listed 'Best First'.
•Re: cgi.pm images
by merlyn (Sage) on Apr 09, 2002 at 20:56 UTC
Re: cgi.pm images
by Speedy (Monk) on Apr 09, 2002 at 21:27 UTC

    Another way might be to use a short "here" document in the flow of the CGI statements. For example, to put a graphic at the top, something like the example below will work. Just be sure the EOF (or whatever word you use to start and end the "here" document) starts in the first space and is immediately ended with a line feed.

    #!/usr/bin/perl use CGI; use strict; use warnings; my $q=CGI->new(); print $q->header; print $q->start_html; print <<EOF; <img src="/images/logo.gif" alt="logo" border="0"> EOF [other cgi statements] print $q->end_html;

    Live in the moment

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://157892]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.