Hi All,

I am truing to use a variable inside a regex.

This work (without the variable):
$ p6 'my $x="6937-2.2.19882.exe"; if $x ~~ m/ .*? <<:\N**4>> "-" (.*?) ".exe" / {say "yes";}'
   yes

I want to turn `<<:\N**4>>` into a variable:


$ p6 'my $x="6937-2.2.19882.exe"; my $i="<<:\\N**4>>"; if $x ~~ m/ .*? $i "-" (.*?) ".exe" / {say "yes";}else{say "No"}; say "$i";'

   No
   <<:\N**4>>

The double \\ is to get it past bash


What am I doing wrong?

Many thanks,
-T

Reply via email to