Ok I am still breeding on my array of hashes and the references...
I decided that the array of hashes is too small for me.. I need to store more values...
In fact I need now an array of hashes of values AND a array of hashes

so it should look like:
array[1]{"Company"} = "CompanyA" #Name of company A array[1]{"Street"} = "StreetA" #Street of company A array[1]{"Contact"}array[1]{"Contact_Tel"} = "4654" #Tel of Contact +1 from Comp A array[1]{"Contact"}array[1]{"Contact_Name"}="Mr B" #Name of Contact + 1 from Comp A array[1]{"Contact"}array[2]{"Contact_Tel"}= "6544" #Tel of Contact +2 from Comp A

i already created my second hash but i dont know how to push it into the hash
it says:
Type of arg 1 to push must be array (not hash element) at H:\legal\xlsparse.pl line 78, near "%contacthash;"
So I need to treat the hash as an array.. or something like that!?...... ARGH CONFUSING
it got to do something with references

I am already able to store it as a reference to the hash but then the idea of a array would be lost...

Anyway, is it possible to create that array? Or should I use a more intelligent way to store my data?

Cheers Schuk

In reply to Array of hashes of values AND Arrays of Hashes by Schuk

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.