<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">#! /usr/bin/perl
# Pattern matching is Case Sensitive, and apparently only works for scalar

open (tfile, "&lt;mtch_wd.txt") || die "cannot find file";
$x = &lt;tfile&gt;;

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";
  }

</pre></body></html>