in reply to && comparison not working

if ($list =~ /$check/ && $list =~ /$con/) {

This condition will never be true because there is no line in your input file which matches both regular expressions.

Replies are listed 'Best First'.
Re^2: && comparison not working
by NetWallah (Canon) on Mar 02, 2019 at 15:32 UTC
    Depends on how you define 'line', and regex options used. See my (working) solution above.

                    As a computer, I find your faith in technology amusing.