in reply to Assign and print Hash of hashes

Assume that you were asking about the syntax error, it can be fixed this way:

foreach $subkey (keys %{$samplehash{$key}})

Peter (Guo) Pei

Replies are listed 'Best First'.
Re^2: Assign and print Hash of hashes
by sundeep (Acolyte) on Nov 28, 2010 at 15:52 UTC
    Dear Monk,

    When i try to print the key of the first hash, using the following , i get some weird output like HASH(2eASDFS)

     print "\n $key = $samplehash{$key} ";

    Can u tell me , what is the wrong with the command $samplehash{$key} ??