my $path1; if($Zeilen[3]){ $path1 = $Zeilen[3]; }else{ $path1 = "C:/Temp"; } mkdir($path1) or die "Fehler beim Anlegen von $path1:". $!; my $file = $path1.'/index.html'; open(my $fh,'>',$file) or die $!; my $path2 = $path1."/html/"; mkdir($path2); my $string = ''.$file.'';