String trim method

2016-01-31 Thread Tom Browder
On Wednesday, August 5, 2015, Brandon Allbery wrote: > On Wed, Aug 5, 2015 at 6:47 PM, Tom Browder wrote: >> I see that to trim white space from a strings's both ends I have to do this: >> >> my $s = ' yada yada '; >> $s = $s.trim; >> >> Is that

Re: String trim method

2016-01-31 Thread Tom Browder
On Sunday, January 31, 2016, yary wrote: > On Sun, Jan 31, 2016 at 9:29 AM, Tom Browder wrote: >> I don't find '.=' in the operator list. Thanks. > > It's like "+=" > > "$a .= foo(...)" is the same as "$a = $a.foo( ... )" > > Took me a bit to get my

Re: String trim method

2016-01-31 Thread Tom Browder
On Sunday, January 31, 2016, Parrot Raiser <1parr...@gmail.com> wrote: > On 1/31/16, Tom Browder wrote: ... > > Brandon, can you (or anyone else) please explain the statement above? > > I don't find '.=' in the operator list. Thanks. > From

Re: String trim method

2015-08-06 Thread Tom Browder
On Thu, Aug 6, 2015 at 2:23 AM, Brent Laabs bsla...@gmail.com wrote: I think the optimal way would be: my $s = 'yada yada'; That way the program won't have to trim the whitespace off the string every time it is run. In the more general case, I might do it something like: my $s =

Re: String trim method

2015-08-06 Thread Brent Laabs
I think the optimal way would be: my $s = 'yada yada'; That way the program won't have to trim the whitespace off the string every time it is run. In the more general case, I might do it something like: my $s = something-returning-a-string().trim; But I don't think that there really is

String trim method

2015-08-05 Thread Tom Browder
I see that to trim white space from a strings's both ends I have to do this: my $s = ' yada yada '; $s = $s.trim; Is that the optimum way? Thanks. Best regards, -Tom

Re: String trim method

2015-08-05 Thread Brandon Allbery
On Wed, Aug 5, 2015 at 6:47 PM, Tom Browder tom.brow...@gmail.com wrote: I see that to trim white space from a strings's both ends I have to do this: my $s = ' yada yada '; $s = $s.trim; Is that the optimum way? I don't know what you mean by optimal there, but you can say