Okay. I guess I blew my explanation. Here are snippets of code from my HTML document and my CGI.

HTML Code

<p>.....Yada, Yada, Yada... <select name="pet" size="1" onChange="showimage()"> <option selected value="pets.gif">Your Favorite Pet</option> <option value="afghanhd.jpg">Big dogs</option> <option value="austter.jpg">Little dogs</option> <option value="ragdoll2.jpg">Cats</option> <option value="fish1.jpg">Fresh water fish</option> <option value="gerbil.jpg">Gerbils</option> <option value="morganhorse.jpg">Horses</option> <option value="parrot.jpg">Parrots</option> <option value="macaw.jpg">Macaws</option> <option value="toucan.jpg">Toucans</option> <option value="snap.jpg">Turtles</option> <option value="iguana.jpg">Iguanas</option> <option value="sinaloan.jpg">Snakes</option> </select> </p>

CGI Code

#!/usr/bin/perl -w require "cgi-lib.pl"; &ReadParse; #color.cgi #Warn browser that HTML is coming print &PrintHeader; print <<"eohtml"; <html><head><title>Thanks for responding</title></head> <body bgcolor = "#FFFFFF"><H1>Thank You</H1> <p>What a coincidence, $in{'firstname'} $in{'lastname'}!!</p> <p>My favorite color is $in{'color'} <strong>AND</strong> I Love $in{' +pet'}.</p> </body></html> eohtml #End of Program

OUTPUT

Thank You

What a coincidence, Jack Gray!!
My favorite color is yellow AND I Love fish1.jpg.

Desired Output

Thank You

What a coincidence, Jack Gray!!
My favorite color is yellow AND I Love Fresh water fish.

I don't want the drop-down list box in my CGI output, only the description from the HTML option statement.

Again, thanks for all the great responses and I apologize for not fully explaining the assignment.


In reply to Re: Drop-down list Option Value by Happyjack
in thread Drop-down list Option Value by Happyjack

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.