in reply to Re: In search of a better way to trim string length
in thread In search of a better way to trim string
Thanks, theAcolyte!
Ran your code. I think you need to add a space here:
With your code, when I passed the sub a string such as "this is a very long sentence without spaces in between", it gets transformed to "thisisaverylongsentencewithout" i.e. the original spaces were gone.$clipped .= $_; # orginal $clipped .= "$_ "; # changed
cheers
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: In search of a better way to trim string length
by theAcolyte (Pilgrim) on Jul 20, 2004 at 00:30 UTC |
In Section
Seekers of Perl Wisdom