what you are seeing is a
reference to the data held under that key, so "
ARRAY(0x183d294)" for example is the location where the value associated with "ATA" is stored, to access that value you need to dereference it using the appropriate dereferencers, read the links at the bottom of my previous reply.
Since the reference type in this case is of an ARRAY something like "@$hash{ATA}}" would show you the values associated with "ATA", to access them one at a time you can specify indices like you do any regular arrays; $hash{ATA}[0] would print the first element of the anonymous array associated to the key "ATA"..
The module Data::Dumper would show you the data structures stringified so that you could judge if they look like you expected them before proceeding any further...
#ADD this to the previous code...
use Data::Dumper;
print Data::Dumper->Dump([\%hash1],['FIRST HASH']),"\n";
print Data::Dumper->Dump([\%hash2],['SECOND HASH']),"\n";
print Data::Dumper->Dump([\%hash3],['MERGED HASH']),"\n";
Note also that there can be more than one way to do it which would become clearer when you start dealing with more complex data structures..
Excellence is an Endeavor of Persistence.
Chance Favors a Prepared Mind.
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.