#! /usr/bin/perl
# Pattern matching is Case Sensitive, and apparently only works for scalar

open (tfile, "<mtch_wd.txt") || die "cannot find file";
$x = <tfile>;

if ( $x =~ /World/ )
  {
  print "The word `World' was found in the first line of file \n";
  }

if ( $x !~ /Pineapple/ )
  {
  print "The word `Pineapple' was not found in the first line of file \n";
  }

