Help for this page
$string =~ s/^\s+/ /; ($string) = $string =~ /^\s?(.{0,50}\w+)/; if (length $string > 50) { $string =~ s/\w+$//; }