in reply to Search Engine troubles

This "search engine" is really just a grep. There are many free search engines which are faster, scale better for large numbers of documents, and solve the problem of ignoring HTML tags. Some common ones include Swish, Glimpse, and ht://Dig. You can read more about them at searchtools.com. There are some pure Perl solution listed there. You could also look at Search::InvertedIndex.