SyntaxFix
Write A Post
Hire A Developer
Questions
Did you try to chomp the $str1 and $str2?
$str1
$str2
I found a similar issue with using (another) $str1 eq 'Y' and it only went away when I first did:
chomp($str1); if ($str1 eq 'Y') { .... }
works after that.
Hope that helps.