#!/usr/bin/perl #Start the modules use strict; use CGI; #Create a new CGI object my $Page = new CGI; #Take the inoformation from the CGI module my $Info = $Page->param("words"); #Print out an HTML MIME Header print $Page->header; #Print out the proper HTML print < Your results HTMLSTUFF #Check to see if the information has only one word if ($Info =~ m/ /) { print "

Please use only one word.

\n"; print < MOREHTML exit; } #Make sure the file can be opened unless (open (FILE, "<../Names.html")) { print "

Make sure the file is there

\n"; print < MOREHTML exit; } #Read the whole thing into an array my @Lines = ; #Close the file close (FILE); #Use "grep" to find the goods my @Names =~ grep("$Info", @Lines); my $i; ############The whole thing #Print out the word "Results print "

Here's the results

\n"; #Print out all of that shit #Do a "for" loop to print each of the names for ($i=0; $i<=@Names; $i++) { print "

$Names[$i]

\n"; } ##########End it all print "\n"; print "\n";