Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: How do you change the picture displayed?

by knobunc (Pilgrim)
on Mar 22, 2002 at 15:05 UTC ( [id://153569]=note: print w/replies, xml ) Need Help??


in reply to How do you change the picture displayed?

first off your page will not include the values from your arrays because it looks like your are relying on string interpolation to get the stuff displayed (e.g. $disc$prod), but your string is in single quotes which forbid interpolation and you don't want to use double quotes since they are in the string. You have a couple of choices here:

# You can change the quote character using the # qq operator (there is an equivalent q operator # for use when you want to replace single quotes print qq'<html><head></head><body bgcolor="#C0C0C0"> ... '; # You can use any character after qq and things # that logically pair like () or {} can be used: print qq{<html><head></head><body bgcolor="#C0C0C0"> ... }; # Or you can use a here document to include a chunk # of stuff. The double quotes tell it to allow # interpolation. Note you can replace EOF with # anything you want, but it must appear at the # start of a line and there must be nothing # following it on the line. print <<"EOF"; <html><head></head><body bgcolor="#C0C0C0"> ... EOF

With regards to your question about images, you probably just want to store the URL of the image (or a fragment of it) and use that in an <img> tag:

# Up at the top my @image = ('HSDIT001.jpg', 'HSDIT002.jpg', 'HSDIT003.jpg', ...); # Then down in your page body in the table cell you # wanted the image in: <img src='images/$image[$prod]'>

-ben

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://153569]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (3)
As of 2024-03-29 02:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found