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 head around it when I first encountered it, no
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 http://doc.perl6.org/routine/trim "In order to do in-pla
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 head around it when I first encountered it, now
it's like "why don't more languages do this!"
(th
>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 wrote:
> 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 s
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 the optimum way?
>
> I don't know what you m
On Thu, Aug 6, 2015 at 2:23 AM, Brent Laabs 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 = something-
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 a
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
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
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
10 matches
Mail list logo