#!/usr/bin/perl use strict; use utf8; use open ':encoding(UTF-8)'; use open ':std'; open OUT, ">ausgabe.txt" or die; my $BOM = chr(0xFEFF); print OUT "$BOM"; while(<>){ chomp; print OUT "$_\n"; }