if (fileno $CountryCode){ print $CountryCode $satz; } else { $land = $CountryCode; $datei = "$verzeichnis.$land.txt"; open ($CountryCode,">:raw:utf8",$datei); print $CountryCode $header; print $CountryCode $satz; }