No problem here - just solved a problem and thought I would post the solution here so that others might not waste the time that I did.

After working on *nix for the last several years I got used to invoking "perldoc" at the command prompt and having the "less" pager function display the perldoc text. This is nice because "less" give you much more power than the standard Windows "more" pager function. With "less", you can search through the text being displayed, and use the Page Down and Page Up buttons to scroll forwards and backwards through the text. Can't do those things with "more".

So now that I'm on Windows XP, I've been having the hardest time trying to get "less" functionality in "perldoc" so that I can *search* the perldoc text. With an excellent example from Jeff Zucker I've been working on a CGI script that will display the perldocs in the browser which works fine for the example "perldoc DBI", but I've been having problems getting the cgi script to display output for "perldoc perl".

Anyway, I just solved the "less" problem - here are the steps I took:
1. download the "less" utility from
- I downloaded the Sources Setup package and ran that and installed "less" to C:\Program Files\GnuWin32 (it installs "less.exe" in the \bin directory) 2. In Control Panel, dbl-click on "System", then click on the "Advanced" tab, and then on the "Environment Variables" button at the bottom. Here I added 2 new "User variables" called PATH and PAGER: PATH C:\Program Files\GnuWin32\bin;%PATH% PAGER "C:\Program Files\GnuWin32\bin\less.exe" 3. Click "Ok" on the Environment Variables dialog 4. Click "Ok" on the "Advanced" tab 5. Exit out of any open Command Prompt windows 6. Bring up a new Command Prompt window, and enter perldoc perl Your should now be able to use - Page Down button (on the keyboard) - Page Up button (on the keyboard) - Search - using the forward slash "/" * if I wanted to search for all occurrences of the word "perl", then I would do "/perl" and press Enter. You should see each occurrence of "perl" hightlighted. Press "n" to advance to the "n"ext occurrence.
Hopefully I haven't left anything out, and I hope at least someone finds this useful besides me ;-)

In reply to perldoc on WinXP - with "less" instead of "more" by hmerrill

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.