That's the way I'd go too, but there's a little problem in your implementation:
Fix:$ perl -le'print "abc def" =~ m[(^.{0,100})\s]' abc
m[(^.{0,100})(?!\S)]
m[(^.{0,100})(\s|$)]
In reply to Re^2: substr question
by ikegami
in thread substr question
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |