use v5.12; use warnings; use utf8; use Encode qw(encode decode); my $enc = 'utf-8'; my @orte=qw(Köln Mannheim Hamburg Würzbürg); foreach my $ort (@orte) { my $ort_sprintf = sprintf "%-15s EOL\n", $ort; my $ort_encoded=encode($enc,$ort_sprintf); print $ort_encoded; }