http://qs321.pair.com?node_id=105888


in reply to grepping man pages

man pages are under a format that can be read by groff. you could get the ascii text of a man page by doing this:
open(MAN, "groff -Tascii $manpath/$manfilename |") or die"ERROR:$!\n"; @manpage = <MAN>;
where $manpath is the path to your man pages ('/usr/local/man/' on my system).

$manfilename is the particular man page you are trying to get.

Look around the directory, you will understand how the files are stored.

Hope that helps,
Guillaume