Re: Accesing hash of hashes

2003-11-13 Thread R. Joseph Newton
Ravi Malghan wrote: > Hello: I am trying to create and access a > multidimensional hash. > > For example the following works > == > $route {$routeDest} = $cost ; > print "$routeDest, Cost: $route{$routeDest}\n" > = > > But the following does not print the > $route{$NODE}{$routeDest} >

Re: Accesing hash of hashes

2003-11-12 Thread Dan Anderson
Why not use: $route{$NODE} = {$routeDest => $cost}; Also, check out the perl reference tutorial: http://www.perldoc.com/perl5.8.0/pod/perlreftut.html -Dan -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Accesing hash of hashes

2003-11-12 Thread James Edward Gray II
On Nov 12, 2003, at 11:52 AM, Ravi Malghan wrote: Hello: I am trying to create and access a multidimensional hash. For example the following works == $route {$routeDest} = $cost ; print "$routeDest, Cost: $route{$routeDest}\n" = But the following does not print the $route{$NODE}{$routeDest

Accesing hash of hashes

2003-11-12 Thread Ravi Malghan
Hello: I am trying to create and access a multidimensional hash. For example the following works == $route {$routeDest} = $cost ; print "$routeDest, Cost: $route{$routeDest}\n" = But the following does not print the $route{$NODE}{$routeDest} == $route {$NODE}{$routeDest} = $cost;