in reply to Case insensitive string compare

You need to use the =~ notation to check the regex.

if ($test =~ /yes/i)

The eq operator is the string comparison operator. You can use it to match a string exactly.

HTH