#!/usr/bin/perl open(DATEI, "<./Konfigurationsdaten/20060310.DOCFIELD") || die "Fehler beim öffnen von Datei $datei - $!"; my @Zeilen = ; close(DATEI); my %hash2; my $old_doc; my %hash;  foreach (@Zeilen){      if (/(\w+)\;(\d+)\;(\d+)/){        $dokuart =  $1;        $zahl1 =  $2;        $zahl2 =  $3;        if(!defined $old_doc){          $old_doc = $dokuart;        }        if($dokuart!=$old_doc){        $hash2{$old_doc}=\%hash;                %hash;                 #<---vielleicht liegt hier das problem        }        open(DATEI, "<./Konfigurationsdaten/20060310.REPOSITORY") || die "Fehler beim öffnen von Datei $datei - $!";        my @Zeilen2 = ;        close(DATEI);        foreach(@Zeilen2){          if(/^$zahl2;(^[;]+)/){            $hash{$zahl1}=$1;                                          }        }              }      $old_doc = $dokuart;  }      foreach my $ele ( keys(%hash2)){    print "$ele\n";    foreach my $ele2 (keys %{ $hash2{$ele} }){      print "$ele2\n";      print "$hash2{$ele}{$ele2}\n";   }  }