As long as the options are all being stored in one hash
anyhow, I think the reference-to-options-hash usage
of Getopts::Long is easier to read:
[snip]
# Process and validate the command line options in @ARGV.
my %options;
GetOptions (
\%options,
qw{
infile=s
outfile=s
help
}
) or help();
[snip]