@array = ("Datei1","Datei2","Datei3"); my %Ausgabe = ("Zeile1",2,"Zeile2",2); for(0..$#array){ open (NOA, ">","$array[$_].NOA") or die "Couldn't open $array[$_].NOA for writing: $!\n"; print NOA $array[$_]."\n"; printf NOA "%s\t=\t%.3f\n",$_, $Ausgabe{$_} for keys %Ausgabe; close(NOA); }