use v5.30.0; 'ABC' =~ /B/ if @ARGV; my $last; say ' (\'NAME\'=~/$last/i)=', 'NAME' =~ /$last/i ? 1 : 0; #### D:\>surprise.pl ('NAME'=~/$last/i)=1 #### D:\>surprise.pl all ('NAME'=~/$last/i)=0
## D:\>surprise.pl ('NAME'=~/$last/i)=1 ##
## D:\>surprise.pl all ('NAME'=~/$last/i)=0