#! /usr/bin/perl use warnings; use strict; use Pod::Text; use File::Basename; userManual(); sub userManual { # show user manual my $pod = basename $0; # the pod text is in the perl filew my $tmp = getTMP(); # look for a temp file my $parser = Pod::Text->new (); # convert pod to text $parser->parse_from_file ($pod, $tmp); # do the convertion die "Can't open $tmp ($!)\n" unless (open (TXT, $tmp)); # OOPS while () { # display the text file print; } close TXT; # close the text file unlink $tmp; # and delete it } sub getTMP { use POSIX qw(tmpnam); my $name; do { $name = tmpnam() } until (! -e $name); # try until we get one that didn't already exist return $name; } =pod =head1 PROGRAM NAME B - This is the program =head1 DESCRIPTION The program B bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla. =head1 AUTHOR memo garcia . March, 2010 =cut