foreach my $identnr ( keys %$daten_ref ) { doc_vorhanden( $identnr, $daten_ref, keys %{ $daten_ref->{$identnr} } ); }