$ perl -le'print"x"=~//?"yes":"no"; "y"=~/y/; print"x"=~//?"yes":"no"' yes no $ perl -le'print"x"=~//?"yes":"no";{"y"=~/y/} print"x"=~//?"yes":"no"' yes yes #### use warnings; use 5.014; my @stoppedGeneralServices = ('OP Mover', 'OP Monitor'); my $supported = '4.0.0,4.0.1,4.1.0,4.1.1,4.1.2'; $supported =~ /\Q4.1.2/ if @ARGV; startGeneralServices(); sub startGeneralServices { my $last = shift; my $name; while (@stoppedGeneralServices) { $name = pop @stoppedGeneralServices; say ' Starting $name=\'', $name, '\' $last=', defined $last ? "'$last'" : 'undef', ' ($name=~/$last/i)=', ($name =~ /$last/i) ? 1 : 0; last if $name =~ /$last/i; } } #### use warnings; use 5.014; '4.1.1,4.1.2' =~ /\Q4.1.2/ if @ARGV; my $last = ''; my $name = 'OP Mover'; say '$name=\'', $name, '\' $last=', defined $last ? "'$last'" : 'undef', ', $name=~/$last/i = ', ($name =~ /$last/i) ? 1 : 0; #### $ perl 11102215.pl $name='OP Mover' $last='', $name=~/$last/i = 1 $ perl 11102215.pl all $name='OP Mover' $last='', $name=~/$last/i = 0