Thanks, your comments for cleaning up my code helped a lot. I switched over that entire three lines , 6-8, to
push @{$wo_usr_proj{$project}}, $user;
I had some other stuff in that if statement that needed to be done too. but now when I print out the values from %wo_usr_proj, I only get array memory addresses:
foreach $proj(sort(keys(%wo_usr_proj))) { print RHANDLE "$proj:\n"; foreach $element(sort($wo_usr_proj{$proj})) { print RHANDLE "$element\n"; } print RHANDLE "\n\n"; }
That gave me the array memory adresses as output into my file I then tried:
foreach $proj(sort(keys(%wo_usr_proj))) { print RHANDLE "$proj:\n"; foreach $element(sort($wo_usr_proj{$proj})) { print RHANDLE \$element; print RHANDLE "\n"; } print RHANDLE "\n\n"; }
thinking that by derefencing $element it would give me the value, but instead it gave me scaler memory adresses. I don't think that the user names are actually getting put into the hash. Is there some initialization that needs to occur to "tell" the hash that its value is an array? I think if I get past this last part I'll be done. Thank you in advance for any help or comments on my code.

In reply to Re: Re: dealing with arrays as hash values by goonarific
in thread dealing with arrays as hash values by goonarific

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.