Perl Command Line Option

From GM-RKB
Jump to navigation Jump to search

A Perl Command Line Option is a Command Line Input to a Perl program.



References

2013

my $inputFile = shift @ARGV ;
$inputFile = "$mwTermsFileDefault" if (not defined $inputFile ) ; 
my $outputFile = shift @ARGV ;
$outputFile = "$outFileDefault" if (not defined $outputFile ) ; 
use Getopt::Long ;
die "ERROR in parameter processing.\n" if not GetOptions (
   'inFile:s'   => \$inputFile,
   'outFile:s'  => \$outputFile,
...
   'help'        => \$help,
) ;