if I have an object $obj that contains an element 'param' obtained by
$obj->{'param'} that is a hash whose elements would be referenced by
$obj->{'param'}{key}, and I want to iterate through the keys of this hash, i would try the following:
for my $key ( keys $obj->{'param'} ) {
#do something with data
}
That doesn't work, so I tried enclosing the hash in the following ways
keys {$obj->{'param'}} and
keys ($obj->{'param'}) and
keys [$obj->{'param'}] and all give me the similar errors... either
Type of arg 1 to keys must be hash ( not hash elem) at ....
or
Type of arg 1 to keys must be hash (not scalar ref constructor) at ...
+.
I know I'm being stupid somehow... help