I don't understand this logic or data structure, but I will attempt to explain it in English.
for every element in array unlike (which is username) map keys values from hash entries to ??? with name and host. Assign t +his to the array hosts.
I understand the print statement, but the data structure build I do not.
Why do you need keys %{$entries{$name} and why not just keys %{$entries}?
I would like to see output like so or something to that effect: I tried adding values uid and gecos but got errors and played for awhi +le and could not get it printed correctly. So you are using name and uid as the keys and host,gecos and gid as va +lues? I seem to struggle with hashes even though I have read Learning and Pr +ogramming Perl. Any advice you have? wlprdadm found with uids of 134 and 135 on /home/dbsmith/passwd.eipdbmp1.hpux $gecos /home/dbsmith/passwd.carappp1.hpux $gecos as an example. thank you!

In reply to Re^4: trying to decide best data structure for problem at hand. by mikejones
in thread trying to decide best data structure for problem at hand. by mikejones

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.