Help for this page
if (length $word > 45) { my $forty_sixth = substr($word, 45, 1); $word = substr($word, 0, 45); $word =~ s/\s*\w*\z// if $forty_sixth =~ /\w/; }
if (length $word > 45) { my $forty_sixth = substr($word, 45, 1); ... $word =~ s/\w+\z// if $forty_sixth =~ /^\w/; $word =~ s/\s+\z//; }