#!/usr/local/bin/perl # # search.pl # version 961211 # copyright 1996 by bo larsson # all rights reserved # # this CGI program will search a text file for the desired string and generate # an html table on-the-fly. The text file should have tab-delimited fields and # return-delimited records. # # bugs or feedback to bliss@seagull.net # for information on how to use, visit http://www.seagull.net/bliss/ # what does the user want to find? ($dump,$search) = split(/=/,$ENV{'QUERY_STRING'}); # let's not make the search case-sensitive, ok? $ucsearch = uc($search); $the_file = "./search.txt"; $started_table = "no"; print "Content-type: text/html\n\n"; print "
"; print "$field | "; } # end of one table row print "
"; } else { print "unable to open the file $the_file.\n"; } } else { print "No query string given"; } print "";