Print Entire hash list (hash of hashes)

I have a script with dynamic hash of hashes , and I want to print the entire hash (with all other hashes).
Itried to do it recursively by checking if the current key is a hash and if yes call the current function again with refference to the sub hash.
Most of the printing seems to be OK but in some of them I'm getting :
HASH(0x98f3dc8)

Any suggestions how can I implement this ?

I guess you are talking of a Perl script here.
What you see is when you try to print a Perl hasref.
To see its contents you need to derefernce it like e.g.

print map "$_\n", keys %{$some_hashref};

The easiest way to gain instant insight into your nested data structures
would be to load your script into the Perl debugger
(just issue "$ perl -d /path/to/yourscript.pl")
Then continue to a line (type c line#) where your data structure
has been built up or autovivified.
Then type "|x $hashref" or "|x \%hash" and page through your LoL.
You also could use the

Data::Dumper

module in your script.
See its POD for details.
Oh no, I hate those silly auto-inserted smileys as in Dumper above)