Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Assign and print Hash of hashes

by PeterPeiGuo (Hermit)
on Nov 22, 2010 at 04:38 UTC ( [id://872887] : note . print w/replies, xml ) Need Help??


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} ??