my $fn = "/path/to/file"; open(my $fh, ">", $fn) or die "Fehler beim Öffnen von $fn: $!";