in reply to Printing multiple unknown hashes..
I think you might be well served by using a HoH (hash-of-hashes) for this. Consider the following data structure:
$VAR1 = { '0810100293' => { 'ip' => '192.168.1.2', 'host' => 'otherbox.myhome.com' }, '0810100294' => { 'ip' => '192.168.1.3', 'host' => 'thisbox.myhome.com' }, '0810100295' => { 'ip' => '192.168.1.4', 'host' => 'thatbox.myhome.com' }, '0810100292' => { 'ip' => '192.168.1.1', 'host' => 'mybox.myhome.com' } };
This should allow you to do simple lookups of the IP addresses and host names, and all contained in one variable.
|
|---|