#!/usr/bin/perl -w print "content-type:text/html; charset=utf-8\n\n"; print qq(); print "enter a word \n"; #$word = ; open ($INPUTFILE, '<', "/home/pe16132/public_html/csc271/note/scripts/perl/ex1.txt") or die("ex1.txt not found $!"); while ( $word = <$INPUTFILE>){ print $word ; print qq(
); if ( $word =~ m/The.*End/ ) { print "Matched The .. End\n " ; print qq(
); } else { print "Did not match The ... End\n"; print qq(
); } } print qq();