- or download this
$ perl -le'print"x"=~//?"yes":"no"; "y"=~/y/; print"x"=~//?"yes":"no"'
yes
...
$ perl -le'print"x"=~//?"yes":"no";{"y"=~/y/} print"x"=~//?"yes":"no"'
yes
yes
- or download this
use warnings;
use 5.014;
...
last if $name =~ /$last/i;
}
}
- or download this
use warnings;
use 5.014;
...
say '$name=\'', $name, '\' $last=',
defined $last ? "'$last'" : 'undef',
', $name=~/$last/i = ', ($name =~ /$last/i) ? 1 : 0;
- or download this
$ perl 11102215.pl
$name='OP Mover' $last='', $name=~/$last/i = 1
$ perl 11102215.pl all
$name='OP Mover' $last='', $name=~/$last/i = 0