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 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 something like

Re: String trim method

2015-08-05 Thread Tom Browder
On Wed, Aug 5, 2015 at 6:00 PM, Brandon Allbery wrote: > I don't know what you mean by "optimal" there, but you can say something > like > > $s .= trim; I really meant the preferred or best practice way. Thanks, Brandon! -Tom