The hash can't be printed otherwise. It's a deep tree and just
print'ing it would just give the top level keys and HASH(0x12345).
Sorry I only have psuedo code. The actual program is huge[TM].
Although I could try to make a junk program that does nothing
except assign to %datahash.
The %datahash tree essentially looks like:
(
"index",
{
baseip => "1.2.3.4",
deviceid => "81F1FD9964973BB63B3446881F901AF5",
sysname => "router",
},
"routes",
{
"0.0.0.0.0.0.0.0.2.3.4.5" => {
ifindex => 0,
mask => "0.0.0.0",
net => "0.0.0.0",
nexthop => "2.3.4.5",
proto => 3,
type => 4,
},
},
"interfaces",
{
1 => {
ARP => 3,
ifAdminStatus => 1,
ifAlias => "",
ifDescr => "FastEthernet0/0",
ifIndex => 1,
ifOperStatus => 1,
ifSpeed => 100_000_000,
ifType => "ethernetCsmacd",
},
I found the page that talked about the hash of hashes problem. It's
http://www.chat11.com/Perl_Memory_Usage . Ring any bells?
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.