$a = "I have to get the + version"; $b = "I have to get the + version"; if($a =~ m/$b/i) { print "Ok\n"; } else { print "Not the same...\n"; }