in reply to Referencing to a hash inside a hash of hashes.

You've got a couple problems here. 1st you can't do what you're looking to do they way you're looking to do it.

When you assign like  $hash{'myhash'}->{ODIR} = %direc; .. there's 2 problems. One, it should be..  $hash->{'myhash'}{ODIR} = ... and second, it's not doing what you think it's doing.

Without giving it away, put this in your script.

print scalar %direc;
That is exactly how the assignment is getting evaluated. It's not assigning the hash itself, it's assigning the results of the hash being evaluated in scalar context.

What I think you want to do is assign a refrence to the hash as in

$hash->{'myhash'}{ODIR} = \%direc;
Now the key ODIR will contain a refrence to the hash %direc. And you'd print it like so..
foreach (sort keys %{$hash->{myhash}{ODIR}}){ print "$_ => $hash->{myhash}{ODIR}{$_}\n"; }
Hope this helps..
Rich