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


In reply to Re: How do you change the picture displayed? by knobunc
in thread How do you change the picture displayed? by Hunter-X-

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.