Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Printing multiple unknown hashes..

by mephit (Scribe)
on Jul 03, 2002 at 21:15 UTC ( [id://179321]=note: print w/replies, xml ) Need Help??


in reply to Printing multiple unknown hashes..

Hmm, what you're suggesting smells of symbolic references, which should be avoided. Why not use a hash of hashes? The "top-level" keys would be the MAC address, and the value would be an anonymous hash with the IP for the key and the hostname for the value, like such:
%hash = ( 0810100292 => { "192.168.1.1" => "mybox.myhome.com" }, 0810100293 => { "192.168.1.1" => "foo.myhome.com" }, }
There's your "unknown number of hashes" all in one data structure. HTH.

Update Bah! I take too damn long to test the code that I post...

--

There are 10 kinds of people -- those that understand binary, and those that don't.

Replies are listed 'Best First'.
Re: Re: Printing multiple unknown hashes..
by Rex(Wrecks) (Curate) on Jul 03, 2002 at 22:23 UTC
    ++ for actually testing your posted code!

    "Nothing is sure but death and taxes" I say combine the two and its death to all taxes!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://179321]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (4)
As of 2024-03-29 02:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found