use Pod::Text;
pod2text("perlfunc.pod", *filehandle
); # send formatted output to file
$text = pod2text("perlfunc.pod"); # assign formatted output to $text
Pod::Text converts documentation in the POD format (such as can be found throughout the Perl distribution) into formatted ASCII text. Termcap is optionally supported for boldface/underline, and can be enabled with:
$Pod::Text::termcap=1
If termcap is not enabled, backspaces are used to simulate bold and underlined text.
The pod2text()
subroutine can take one or two arguments. The first
is the name of a file to read the POD from, or "<&STDIN"
to read
from STDIN
. The second argument, if provided, is a filehandle glob
where output should be sent. (Use *STDOUT
to write to STDOUT
.)
A separate pod2text program is included as part of the standard Perl distribution. Primarily, a wrapper for Pod::Text, it can be invoked this way:
pod2text < input.pod