This is what I have tried so far:

while (my($tagkey, $tagvalue) = each %{$my_hash_of_hashes}) { if (ref $tagvalue eq 'HASH') { print "TAG:::> $tagkey value $tagvalue\n"; push(@tag_name, "$tagkey"); } foreach my $hash_tag_names (@tag_name) { while (my ($tagkey1, $tagvalue1) = each %{$my_hash_of_ +hashes->{$hash_tag_names}}) { if (ref $tagvalue1 eq 'HASH') { print "TAG:::> $tagkey1 value $tagvalu +e1\n"; } } } }

As I am not allowed to hardcode hash names like @dev, @fred etc I thought the best way would be to be to first parse this hash of hashes and work out what keys were had values that were 'HASH' and then populate an array called @tag_name and then once I have got all the tags (@dev, @fred etc etc...) in this array I could then do a loop on this array and then for each hash then check for more hashes within these and until I get to the level where all the keys are defined as per whats in the schema %definition and then start outputting data to the files ny_loc and nj_loc. I am just stuck as how to proceed further with what I have done so far. Please can you help me as I haven't done anything like this before?


In reply to Re: Parsing a hash of hashes using a schema file by NewLondonPerl1
in thread Parsing a hash of hashes using a schema file by NewLondonPerl1

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.