sub text_aendern { my $text = shift; chomp $text; $text =~ tr/\n/ersetzt/; printf "--$text--"; }