foreach my $key (keys %{$ldif}) { print "\n this is the key:" . $key . "\n"; #need to dereference the subkeys... not working yet below. #for my $subkey ( keys %{$ldif{$key}} ) { # print "Subkey=$$ldif{$key}{$subkey} "; #} print "\n" . "\n"; }