in reply to The command line arguments

Getopt::Long
use warnings; use strict; use Getopt::Long; my %opts; GetOptions(\%opts, qw( p=s o=s i=s h=s )) or die; if ($opts{i}) { print "i\n"; } elsif ($opts{h}) { print "h\n"; }

Here is one invocation:

$ script.pl -p prod -i foo -h bar i