in reply to Re: Use Getopt::Long even if you don't think you need to
in thread Use Getopt::Long even if you don't think you need to
I start every new command line perl script with this template...
#!/usr/bin/perl use strict; use warnings; use Getopt::Long; use Pod::Usage; Getopt::Long::Configure("no_ignore_case"); GetOptions( 'h|help'=> sub { pod2usage( { -verbose => 1, -input => \*DATA } ); exit; +}, 'H|man' => sub { pod2usage( { -verbose => 2, -input => \*DATA } ); exit; +}, ); __DATA__ head1 NAME =head1 SYNOPSIS Options: -h --help Display this help -H --man Display detailed help (examples) =head1 EXAMPLES =head2 First Example...
-biz-
|
|---|