On Sun, Jun 11, 2017 at 6:52 PM, ToddAndMargo <toddandma...@zoho.com> wrote:

> P6:
> $ perl6 -e 'my $x="\t"; if !~ /[^A-Za-z0-9]/ {say "outside"} else {say
> "inside"};'
>

You missed a "$x" in there.

Negation works differently in perl 6 regex. /<-[A..Z a..z 0..9]>/

pyanfar «work*master» Z$ 6 'my $x = "["; if $x !~~ /<-[A..Z a..z 0..9]>/
{say "out"} else {say "in"}'
in
pyanfar «work*master» Z$ 6 'my $x = "c"; if $x !~~ /<-[A..Z a..z 0..9]>/
{say "out"} else {say "in"}'
out


-- 
brandon s allbery kf8nh                               sine nomine associates
allber...@gmail.com                                  ballb...@sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net

Reply via email to