Hello,
Thank you for your reply. For simplicity sake, at any one given time there can be 21 fruit baskets. Each basket will contain X number of fruit consisting of "Fruit Names". So I was trying to use the hash of 0-20, for a total of 21, ( ex. $fruit{0}=248 to identify the total number of pieces of fruit in the basket, and then use ex. $fruit{0}{'fruits'}, to contain an array of the types of fruit that make up the value of $fruit{0}.

I see you change "There are $fruit{0} ... "to There are ", scalar @{ $fruits{0}{fruit} }, ", but I actually was wanting to use $fruit{0} to list the total pieces of fruit in the basket. So in this example, Basket 1 contain 248 pieces of fruit consisting of Apples, Pears, Bananas, Peaches, and Grapes

Thanks
Gary

In reply to Re^2: Array in a Hash by g_speran
in thread Array in a Hash by g_speran

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.