#!/usr/bin/perl -l use strict; use warnings; print "Enter a word: "; my $str1 = ; my $str2 = 'Mahesh'; chomp $str1; print $str1 eq $str2 ? 'Match' : 'No match';