develooper Front page | perl.perl6.users | Postings from January 2019

Re: I need m/ help

Thread Previous | Thread Next
From:
ToddAndMargo via perl6-users
Date:
January 13, 2019 08:44
Subject:
Re: I need m/ help
Message ID:
ec945b24-fd61-1d44-b038-2d1b7a2c7352@zoho.com
On 1/12/19 3:04 PM, Timo Paulssen wrote:
> On 12/01/2019 23:40, ToddAndMargo via perl6-users wrote:
>> But this does not.  What is wrong with (<:N>**2)  ?
>>
>> $ perl6 -e 'my Str $Date=DateTime.now.Str; $Date~~m/ (<:N>**4) "-"
>> (<:N>**2) "-" (<:Nl>**2) "T" .* /; print "$Date\n\t$0  $1  $2\n"'
>> Use of Nil in string context
>>    in block <unit> at -e line 1
>> Use of Nil in string context
>>    in block <unit> at -e line 1
>> Use of Nil in string context
>>    in block <unit> at -e line 1
>> 2019-01-12T14:33:10.692302-08:00
>>
>>
>> Many thanks,
>> -T
> 
> 
> Hi Todd,
> 
> it looks like you have an accidental l in there: the third capture group
> has <:Nl> instead of <:N>.
> 
> Changing that makes it work for me
>    - Timo
> 

Thank you!

Mumble, mumble

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About