Re: perl qstn...

[ Available lists | Index of freebsd-questions | Month of Apr 2010 | Week of 4 Apr 2010 | Raw email | View thread | Wrap long lines | Reply | Tag ]
From
Greg Larkin <glarkin@FreeBSD.org>
Date
4 Apr 2010 04:07:48
Subject
Re: perl qstn...
Message-ID
4BB8108A.9080104@FreeBSD.org

In reply to
References to
Replies

[ Hide this part ]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Gary Kline wrote:
> guys,
>
> i'm finally trying to get my private scripts and binaries in
> ~/bin in order. several of my perl scripts were meant to be
> throwaway ... but a few seem to be more useful and i would have
> to have informational or usage{} type messages.
>
> if a .pl script has to have at least one arg, is there an easy
> way to do that? can i have a perl fn called usage() that would
> be fed various strings?
>
> tia,
>
> gary
>
>
>

Hi Gary,

Check out this Perl module that builds on Getopt::Long, but also
includes support for echoing usage messages for each option:
http://search.cpan.org/~rjbs/Getopt-Long-Descriptive-0.085/lib/Getopt/Long/Descriptive.pm

Hope that helps,
Greg

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.10 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAku4EIoACgkQ0sRouByUApCXNgCgrLt1v3rV2+AjfxXMT1ew3GhE
pZIAn0P5O7L5koQflkiQOuoTA+75POOe
=Cyq4
-----END PGP SIGNATURE-----

Elapsed time: 0.327 seconds