Given a paragraph $p, how would I insert a space into any word that was over 40 characters long?
I tried the following code:
$p =~ s/(\S{40})/$1\ /g;
Would this work in all cases?
In reply to how to find and split long words by keiusui
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |