On 06/11/2017 03:52 PM, ToddAndMargo wrote:
Hi All,

I am not having a lot of lick converting this from
P5 to P6

P5:
$str !~ /[^A-Za-z0-9_]/

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

What am I doing wrong?

-T




Okay, found a couple of booboos, but still ain't there


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


Unable to parse expression in metachar:sym<[ ]>; couldn't find final ']'
at -e:1

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

Unrecognized regex metacharacter - (must be quoted to match literally)
at -e:1
Unable to parse expression in metachar:sym<[ ]>; couldn't find final ']'





--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Computers are like air conditioners.
They malfunction when you open windows
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Reply via email to