in reply to Case insensitive string compare
You need to use the =~ notation to check the regex.
if ($test =~ /yes/i) [download]
The eq operator is the string comparison operator. You can use it to match a string exactly.
HTH