#!/usr/bin/perl
#Program name: example5.pl
# read a string value from the standard input
$my_name = "Pete";
print("Enter your name: ");
$your_name = <STDIN>;
$your_name =~ s/\s*$//; # strip trailing white spaces
if ($my_name eq $your_name)
{
  print ("Your name is the same as mine.\n");
}
else
{
  print("Hello $your_name, my name is $my_name\n");
}
