my $r="abc|xyz"; my $rx=qr($r); my $c="XYZ"; my $x1=($c=~/$rx/i); my $x2=(lc($c)=~/$rx/i); say "\$x1=$x1"; say "\$x2=$x2";
Results in:
$x1=
$x2=1
Shouldn't the /i give us a case insensitive match?
Perl version: This is perl 5, version 28, subversion 0 (v5.28.0) built for MSWin32-x64-multi-thread
Running on Windows 10
Am I missing something obvious>
TIA
In reply to Why does /i not seem to work by perlpipe
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |