>From http://doc.perl6.org/routine/trim "In order to do in-place trimming, once (sic) needs to write .=trim"
On 1/31/16, Tom Browder <tom.brow...@gmail.com> wrote: > On Wednesday, August 5, 2015, Brandon Allbery <allber...@gmail.com> wrote: >> 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 something >> like >> >> $s .= trim; > > Brandon, can you (or anyone else) please explain the statement above? > I don't find '.=' in the operator list. Thanks. > > Best, > > -Tom >