Why does an array hash throw out duplicate values? I have a database of objects (34 in total) and of the 7 or 8 different keys, 6 are the same with the other two being unique. When I place these keys into an array hash by querying the database and pulling from the database records it tosses out duplicates. I want to keep them.

Example input:

JP-AP1-1-RM_210,Johanna Perrin,wism3-1,10.137.139.2,wism4-1,10.137.139 +.6,wism7-1,10.137.139.10,JP,149,not_configured JP-AP1-2-RM_207,Johanna Perrin,wism3-1,10.137.139.2,wism4-1,10.137.139 +.6,wism7-1,10.137.139.10,JP,153,not_configured JP-AP1-3-RM_203,Johanna Perrin,wism3-1,10.137.139.2,wism4-1,10.137.139 +.6,wism7-1,10.137.139.10,JP,157,not_configured JP-AP1-3A-RM_203,Johanna Perrin,wism3-1,10.137.139.2,wism4-1,10.137.13 +9.6,wism7-1,10.137.139.10,JP,36,not_configured JP-AP1-4-RM_204,Johanna Perrin,wism3-1,10.137.139.2,wism4-1,10.137.139 +.6,wism7-1,10.137.139.10,JP,161,not_configured JP-AP1-5-RM_201,Johanna Perrin,wism3-1,10.137.139.2,wism4-1,10.137.139 +.6,wism7-1,10.137.139.10,JP,149,not_configured

Example output:

JP-AP1-1-RM_210,,,,,,,,,149,not_configured, JP-AP1-10-RM_102,,,,,,,,,161,not_configured, JP-AP1-11-RM_101,,,,,,,,,149,not_configured, JP-AP1-12-RM_100,,,,,,,,,153,not_configured, JP-AP1-13-RM_Cafe_Serv_B,,,,,,,,,149,not_configured, JP-AP1-13A-RM_Cafe,,,,,,,,,36,not_configured, JP-AP1-14-RM_300,,,,,,,,,157,not_configured,

In reply to Hash throws out duplicate values by spickles

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.