Strangely, I find that we almost always want our scripts to act this way. If any files or data is passed to the script, then it uses it. Otherwise, it prints usage instructions (since we'd rather not have man pages for scripts, and I don't know how to build them anyway).
Use POD. See 'perldoc perlpod' for all the details.
Then the user can just run 'perldoc scriptname' (provided 'scriptname' is in $PATH) and get a nicely formatted manpage.
--As for the rest, it is mine.
Even better: you can run pod2man on the program/pod file, and end up with a man page. Put that in the standard man search path and the user can type "man $scriptname" as if it were any other unix program.
This if you don't mind man pages for scripts... (Which you said you don't want, but now you can't say you don't know how to build them.)
Daniel T. Staal
--------------------------------------------------------------- This email copyright the author. Unless otherwise noted, you are expressly allowed to retransmit, quote, or otherwise use the contents for non-commercial purposes. This copyright will expire 5 years after the author's death, or in 30 years, whichever is longer, unless such a period is in excess of local copyright law. ---------------------------------------------------------------
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>