Sundeep wrote:
I have a script to do several operations, based on the various options
provided from command line.

For that I have created the help text (script.pl --help). The text is
huge (exceeding 1 page) and I can not cut down on that.

So when users (one who uses my script) asks for help, it just scrolls
off (expected).

Now I've been asked to display the text in the way man pages are
displayed (scrollable up & down), or atleast in "script.pl --help |
more" way... i.e., scrolling in one direction.

Is this possible using perl and how? Any sample code (or link) would
help me do things quick

Assuming that your help text is in POD format:

#!/usr/bin/perl
use warnings;
use strict;

# Your code here


sub help {
    0 == system perldoc => $0       # Run perldoc on myself
        or die "system perldoc => $0 failed: $?";
    }


__END__

=head1 My Help Document

More help stuff here.

=cut




John
--
Perl isn't a toolbox, but a small machine shop where you
can special-order certain sorts of tools at low cost and
in short order.                            -- Larry Wall

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to