provided by: 
Originally published at Internet.comOh man, do people want this! I get so many letters asking for a search engine that will search just the user's site. Well, here ya go. This will search whatever directory you want, list the results, and even recognize if any results were found or not. The script is fairly robust, checking not only the title and file, but also the full file text. I'm giving you a fairly bare-bones results page. You can gussy it up all you want. I'm interested in the script more than its appearance here.
How about we have a look-see, huh? This script is set up to search the directory that contains all of the PERL primers. If you want to be sure to get some results, search "perl" or "Joe". If you want to be sure to not get results, try searching "zorkbabble". I don't think that appears.
See "Search It!" in Action
The HTML and PERL Code
The HTML could not be easier. It's a simple on text box form with a submit button.
The HTML Code
Be sure to change out that ACTION statement so that your HTML attaches to your CGI.
I've done my best to explain as much of the script as possible in the script itself. I've commented out all of the explanation so you can go ahead and paste it as you see it. Be aware there a multiple points in the script where you have to put in your own paths. Don't just copy, paste, upload and hope it'll work. As has been the case in the last couple of primers, I'll open the script in a new window so you can look back and forth...
Read article at Internet.com site