Hi all,
using Data:: Dumper to display the content which a pointer point to .
$config is a pointer
using Dumper($config) to display the content as follows
$VAR1 = {
'Jack' => {
'priority' => '0',
'remotepasswd' => 'shroot',
'remoteaddress' => '10.33.42.44',
'logdir' => '/jack/ocsta/log/',
'remoteuser' => 'root',
'timeout' => '200',
'scriptroot' => '/jack/ocsta/testscripts/',
},
'Damon' => {
'priority' => '0',
'remotepasswd' => 'shroot',
'remoteaddress' => '10.33.42.76',
'logdir' => '/eweiquu/ocsta/log/',
'remoteuser' => 'root',
'timeout' => '300',
'scriptroot' => '/eweiquu/ocsta/testscripts/',
};
how can i traverse this hash using the pointer?
N.B:if we want to get the value of Jack. we can use the statement as follows:
$config-> {"Jack"}->{"timeout"};
Thanks
Damon