#! perl use strict; use warnings; use Getopt::Long; my $L1 = ''; my $L2 = ''; my $p = ''; GetOptions('L1=s' => \$L1, 'L2=s' => \$L2, p => \$p); print "L1 switch: $L1\n"; print "p switch: $p\n"; #### 16:39 >perl 698_SoPW.pl --L1 foo -p L1 switch: foo p switch: 1 16:39 >