#!/usr/bin/perl

##Rule of Thumb in Perl:

#If we want to compare numbers, use ==,!=,>, etc.
#If we want to compare strings, use eq, ne, lt, gt,etc.
my $a="What";
my @b=("hello","Test","hello you","What");
my $c="hello 1";
my $sub_c=substr($c,0,-2);


if ($a eq @b[2]){
	print "$a is the same as $b\n";
}
if ($a eq $sub_c){
	print "$a is almost the same as $sub_c\n";
	}
my $index=0;
foreach(@b){
	if($a eq $_){
	   print "You found the strings $a = $_ at index=$index\n";
        }
	$index++;
}
