The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.


perlindex - index and query perl manual pages


    perlindex -index

    perlindex tell me where the flowers are


"perlindex -index" generates an AnyDBM_File index which can be searched with free text queries "perlindex a verbose query".

Each word of the query is searched in the index and a score is generated for each document containing it. Scores for all words are added and the documents with the highest score are printed. All words are stemed with Porters algorithm (see Text::English) before indexing and searching happens.

The score is computed as:

    $score{$document} += $tf{$word,$document}/$maxtf{$document}
                         * log ($N/$n{$word});



is the number of documents in the index,


is the number of documents containing the word,


is the number of occurances of word in the document, and


is the maximum freqency of any word in document.


All options may be abreviated.

-maxhits maxhits

Maximum numer of hits to display. Default is 15.


Use the matches as menu for calling man. Default is -menu.q


Switch to cbreak in menu mode or dont. -cbreak is the default.


Generates additional information which query words have been not found in the database and which words of the query are stopwords.


    perlindex foo bar

    1  3.735 lib/pod/perlbot.pod
    2  2.640 lib/pod/perlsec.pod
    3  2.153 lib/pod/perldata.pod
    4  1.920 lib/
    5  1.802 lib/pod/perlsub.pod
    6  1.586 lib/Getopt/
    7  1.190 lib/File/
    8  1.042 lib/pod/perlop.pod
    9  0.857 lib/pod/perlre.pod
    a  0.830 lib/
    b  0.691 lib/
    c  0.691 lib/
    d  0.680 lib/pod/perlpod.pod
    e  0.680 lib/File/
    f  0.626 lib/pod/perlsyn.pod
    Enter Number or 'q'>

Hitting the keys 1 to f will display the corresponding manual page. Hitting q quits. All other keys display this manual page.


The index will be generated in your man directory. Strictly speaking in $Config{man1direxp}/..

    The following files will be generated:

    index_fn           # docid -> (max frequency, filename)
    index_idf          # term  -> number of documents containing term
    index_if           # term  -> (docid, frequency)*
    index_seen         # fn    -> indexed?


Ulrich Pfeifer <>