perldoc (was: Re: [Za-pm] Script)

Sean Carte scarte at pan.uzulu.ac.za
Wed Jun 4 08:34:56 CDT 2003


On Wed, 2003-06-04 at 15:21, Nick Cleaton wrote:
> On Wed, Jun 04, 2003 at 02:16:08PM +0200, Spike wrote:
> > I see your use of perldoc entries - nice.
> > Is there a simple way to force perldoc to launch if the user enters 
> > ./myscriptwithdoc --help?
...
> if ( $ARGV[0] eq '--help' ) {
>     exec('perldoc', $0);
> }

That really is amazingly clever! I'm surprised that it I haven't seen
this before. It's going to be a regular feature of any perl scripts that
I write from now on. Thank you!
-- 
Regards
Sean Carte

University of Zululand
Network Services Unit
Phone: 035 902 6081
Fax: 035 902 6028

"Supreme executive power derives from a mandate from the masses, not
from some farcical aquatic ceremony."




More information about the Za-pm mailing list