my $wort = 'hallo'; my $strich = '+' . '-' x length($wort) . '+'; print "$strich\n|$wort|\n$strich\n";