I am new in Perl and struggling with hash. I want to loop through the hash, meaning I want to acces all the elements within 'obj' (the number can be different per 'obj'), e.g.:
$VAR1 = { 'obj1' => ['par1',
'par2',
'par3'
],
'obj2' => ['par1',
'par2',
'par3',
'par4'
]
}
The code snippet below loops only through 'obj'. How can I access the elements within obj?
foreach my $key (keys %hash)
{
print ($key)
}
Any idea how can I access to par within objects or Perl-documentation reference? Thanks for the help!