Okay, so I've got this in a hash table:
"text" => <<"TEXTEND", We play the same game again, but with a different proportion of colore +d balls in Box K (see below). Everything else is the same. <p> You can choose between box U or box K, both containing 100 balls of five different colors. One ball will be drawn from the box you have + chosen. You win &#36;1,000 if a $color_opt ball is drawn. <p> Please select the box of your choice: U or K. If you think both boxes are equally attractive, you can select Indiffe +rent. TEXTEND
What I need is the ability to change the value of $color_opt later on in the script, and have the value automatically update in the hash definition. So let's say I set $colot_opt = "blue" at some point and print out the "text" key value, then it should display "blue", and not whatever $color_opt was initially defined to be. How do I do this? Thanks - Stephen

In reply to updating a variable call in a hash table by coopermc

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.