#!/usr/bin/perl require "cgi-lib.pl"; $match="no"; &ReadParse; print &PrintHeader; open (FILE,"fake.txt") || die "Can't find database\n"; @indata = ; close (FILE); print <<"PrintTag"; Search Results PrintTag foreach $i (@indata) { chop($i); ($ID,$Date,$Where,$School1,$Score1,$School2,$Score2) = split(/\|/,$i); if ($School1=~/$in{'School1'}/i) { $match="yes"; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print "\n"; } } print "
Date School 1 Score 1 School 2 Score 2 Where
$Date$School1$Score1$School2$Score2$Where
"; if ($match eq "no") { print "

Sorry. No matching records were found.

"; } print ""; #end