Re: Test not working so well

2023-12-11 Thread ToddAndMargo via perl6-users
This is from my keeper on "match". It is the Perl 5 way of explaining things. It works really well for me. How did I do? To find a match of "any" of the following my $x="abc2def"; say so $x.match( / ^ <+[0..9] + [a..z]> ** 7 $ / ) my $x="abc2def"; say so $x.match( / ^ <+[0..9] + [a..z]> **

Re: Test not working so well

2023-12-11 Thread ToddAndMargo via perl6-users
On 12/11/23 16:11, William Michels via perl6-users wrote: On Dec 11, 2023, at 15:54, ToddAndMargo via perl6-users wrote: On 12/11/23 15:48, William Michels via perl6-users wrote: On Dec 10, 2023, at 23:22, ToddAndMargo via perl6-users wrote: Is there a list somewhere of all the shortc

Re: Test not working so well

2023-12-11 Thread William Michels via perl6-users
> On Dec 11, 2023, at 15:54, ToddAndMargo via perl6-users > wrote: > > On 12/11/23 15:48, William Michels via perl6-users wrote: >>> On Dec 10, 2023, at 23:22, ToddAndMargo via perl6-users >>> wrote: >>> > > Is there a list somewhere of all the shortcuts, such as "alnum"? > -- https://do

Re: Test not working so well

2023-12-11 Thread ToddAndMargo via perl6-users
On 12/11/23 15:48, William Michels via perl6-users wrote: On Dec 10, 2023, at 23:22, ToddAndMargo via perl6-users wrote: On 12/10/23 22:26, William Michels via perl6-users wrote: Hi Bill, Yes it does help.  I am slowly getting there. If I do not know the length of the sting and have to as

Re: Test not working so well

2023-12-11 Thread ToddAndMargo via perl6-users
On 12/11/23 15:48, William Michels via perl6-users wrote: On Dec 10, 2023, at 23:22, ToddAndMargo via perl6-users wrote: On 12/10/23 22:26, William Michels via perl6-users wrote: Hi Bill, Yes it does help.  I am slowly getting there. If I do not know the length of the sting and have to as

Re: Test not working so well

2023-12-11 Thread William Michels via perl6-users
> On Dec 10, 2023, at 23:22, ToddAndMargo via perl6-users > wrote: > > On 12/10/23 22:26, William Michels via perl6-users wrote: > > Hi Bill, > Yes it does help. I am slowly getting there. > > If I do not know the length of the sting and have to ask > with .chars, is there a way to use a va

Re: .contains question

2023-12-11 Thread ToddAndMargo via perl6-users
On 12/11/23 14:47, Andy Bach wrote:  I have found that when using `say` for debugging, it has been known to print out the previous value of a variable and not the current value.  `print` does not do this. That would certainly be a surprise to me. I'd think I was misunderstanding my program,

Re: Test not working so well

2023-12-11 Thread ToddAndMargo via perl6-users
On 12/11/23 13:39, ToddAndMargo via perl6-users wrote: On 12/11/23 00:55, Kevin Pye wrote: Seriously Todd? "What is a digit?" The characters '0' to '9' are digits.   (Unicode probably has a whole lot of others, but those will do for the moment.) Yes seriously.  Does '9' have the ascii value of

Re: .contains question

2023-12-11 Thread Andy Bach
> I have found that when using `say` for debugging, it has been known to print > out the > previous value of a variable and not the current value. `print` does not do > this. That would certainly be a surprise to me. I'd think I was misunderstanding my program, rather than a bug in say. _

Re: Test not working so well

2023-12-11 Thread ToddAndMargo via perl6-users
On 12/11/23 00:55, Kevin Pye wrote: Seriously Todd? "What is a digit?" The characters '0' to '9' are digits. (Unicode probably has a whole lot of others, but those will do for the moment.) Yes seriously. Does '9' have the ascii value of 57 or the binary value of 9? Or do you mean a single c

Re: .contains question

2023-12-11 Thread ToddAndMargo via perl6-users
"so" will collapse the junction into a Bool. "say" will append a \n for you, so you don't have to. On 11 Dec 2023, at 01:52, ToddAndMargo via perl6-users wrote: On 10 Dec 2023, at 21:36, ToddAndMargo via perl6-users wrote: Hi All, my Str $x="abc3defg"; if $x.contains( "a" || "b" || "3

Re: .contains question

2023-12-11 Thread Elizabeth Mattijsen
my $x="abc45def"; my @y=; say so $x.contains(any @y); "so" will collapse the junction into a Bool. "say" will append a \n for you, so you don't have to. > On 11 Dec 2023, at 01:52, ToddAndMargo via perl6-users > wrote: > >>> On 10 Dec 2023, at 21:36, ToddAndMargo via perl6-users >>> wrote: >

Re: Test not working so well

2023-12-11 Thread Kevin Pye
Seriously Todd? "What is a digit?" The characters '0' to '9' are digits. (Unicode probably has a whole lot of others, but those will do for the moment.) On Mon, 11 Dec 2023, at 18:22, ToddAndMargo via perl6-users wrote: > On 12/10/23 22:26, William Michels via perl6-users wrote: > If I do not kn