use strict; use warnings; use Getopt::Long; use Pod::Usage; # Process and validate the command line options in @ARGV. my %options; my $parse = new Getopt::Long::Parser; if (!($parse->getoptions('infile=s', \($options{infile}), 'outfile=s', \($options{outfile}), 'help', \($options{help})))) { help(); } if (not defined($options{infile})) { help(); } sub help { pod2usage(0); } __END__ =head1 NAME A.pl - Creates A file =head1 SYNOPSIS A.pl [options] Options: --infile=[file] --help =over 3 =item B<--infile -i=[file]> A file that is used for input, wildcards are allowed =item B<--outfile -o=[file]> Optional parameter for the output file =item B<--help -h -?> Print a brief help message and exits. =head1 DESCRIPTION B creates a A files. =cut