-- Parse command line options
#!/app/holt/public/bin/perl
use Getopt::Long;
my $PARM1;
my $PARM2;
my $PARM3;
GetOptions(
'parm1=s' => \$PARM1,
'parm2=s' => \$PARM2,
'parm3=s' => \$PARM3,
);
print "Parm 1 is ... $PARM1 \n" ;
print "Parm 2 is ... $PARM2 \n" ;
print "Parm 3 is ... $PARM3 \n" ;
# execution example
./test1.pl --parm1 one --parm2 two --parm3 three
Parm 1 is ... one
Parm 2 is ... two
Parm 3 is ... three
|
|