in reply to (bbfu) Re: Smart Substrings
in thread Smart Substrings

A bit opaque, but you can do this for a one-liner:
my $short = substr($string, 0, rindex($string, ' ', $len) + 1 || $len) +;
This leaves you a trailing space, however.
   MeowChow                                   
               s aamecha.s a..a\u$&owag.print