If you want something easy to use, have a look at CGI::Application::Search. It uses the Swish-e search engine to do the indexing and has a nice set of features. Here is a list straight from the docs:
- Sub-Classable. Unlike the Perl examples that come with swish-e, this is not a script, and can be customized without modifiying the original so that several sites may share the same underlying code.
- Uses CGI::Application::Plugin::AnyTemplate to allow flexibility in template engine choice (HTML::Template, Template-Toolkit or Petal).
- Built-in templates to use out of box or as examples for your own templates
- HiLighted search results
- HiLighted pages linked from search results
- AJAX results sent to page without need of a page reload
- AJAX powered 'auto-suggest' to give the user list of choices available for search