in reply to How many levels of indirection in a Hash?

Simplify this is tough but here it goes... I parse out a file with lines like
*rvd*startScript : /binlib/mdi/rv/etc/start_rvd *rvd*daemonPort : 7500 chilsd03*rvd*daemonPort : 9000
I need to determine the value of daemonPort. If I am running on chilsd03 the value would be 9000 but anywhere else it would be 7500. I refer to this as the scope of the variable being either global or local. I need to scope this further to instance where there can be lines like.
chilsd03*rvd*OUT*daemonPort : 9000
So, the problem I am facing is that I need to figure out a good way to "walk" the hash and load up global and local values but keeping the integrity of the instances. Ideally I need to end up with a hash of
0 'rvd' 1 HASH(0x83d6a40) 'daemonPort' => 7500 'daemonProtocol' => 'tcp' 'httpPort' => 7580 'reliability' => 60 'startScript' => '/binlib/mdi/rv/etc/start_rvd' 'version' => 6.9 4 'IN' 5 HASH(0x83d6b0c) 'daemonPort' => 7500 'daemonProtocol' => 'tcp' 'httpPort' => 8590 'instanceName' => 'IN' 'reliability' => 60 'startScript' => '/binlib/mdi/rv/etc/start_rvd' 'version' => 6.9 6 'instances' 7 ARRAY(0x83d68f0) 0 'rvd' 1 'IN'
What I get instead
0 'rvd' 1 HASH(0x83d6938) 'daemonPort' => 7500 'daemonProtocol' => 'tcp' 'httpPort' => 7580 'reliability' => 60 'startScript' => '/binlib/mdi/rv/etc/start_rvd' 'version' => 6.9 2 'rrcp' 3 HASH(0x83d8818) 'daemonPort' => 7500 'daemonProtocol' => 'tcp' 'httpPort' => 7580 'reliability' => 60 'startScript' => '/binlib/mdi/rv/etc/start_rvd' 'transmissionBus' => HASH(0x83d87b8) 'driverName' => 'sink,1' 'numBuffers' => 500 'version' => 6.9 4 'OUT' 5 HASH(0x83d6a7c) 'daemonPort' => 9575 'daemonProtocol' => 'tcp' 'httpPort' => 9590 'instanceName' => 'OUT' 'reliability' => 60 'startScript' => '/binlib/mdi/rv/etc/start_rvd' 'version' => 6.9 10 'instances' 11 ARRAY(0x83d67ac) 0 'rvd' 1 'rrcp' 2 'OUT'
I appologize for being so verbose.