print "Enter a word: \n"; chomp($string1 = ); $string2 = 'Mahesh'; if($string1 eq $string2){ print "Match \n"; } else { print "Does not match \n"; }