Thread word wrap (7 answers)
Opened by esskar at 2005-06-20 02:17

esskar
 2005-06-20 02:17
#55591 #55591
User since
2003-08-04
7321 Artikel
ModeratorIn

user image
wollte wörter länger als 20 zeichen ein leerzeichen verpassen...
was mach ich falsch?
Code: (dl )
1
2
3
4
5
sub WordWrap {
my ($text) = @_;
$text =~ s!(\s|^)([\S]{20,}?)([\S]*)(\s|$)!$1$2 $3$4!g;
return $text;
}

View full thread word wrap