Larry Wall wrote:
On Mon, Jan 12, 2009 at 05:04:50AM -0800, Ovid wrote:
: ...the trivial $string.trim and trim($string) case.

Hmm, I'd think .trim should work like .chomp, and return the trimmed
string without changing the original.  You'd use $str.=trim to do it
in place.

Can't say I really like the negated options though.  They smell funny.

Larry

I'm +1 on adding a trim, I do a lot of csv import (with trimming) in perl 5.

On a side note, between modifying the original and returning a fixed string, which one would we expect to be faster? And I assume either would be faster than the regex method of trimming?

-Andy

Reply via email to