### Wenn kein .txt gefunden wurde if ($endung eq '-1') { ### Endung anfügen ### $outfile= $outfile . ".txt"; }