foreach $hash(@db){ %temphash = $hash; foreach $key( keys %temphash){ print "KEY: $key \n"; print "VALUE: $temphash{$key} \n"; print "________________________\n"; } #end foreach $key }#end foreach $hash