#! perl use strict; use warnings; use Getopt::Std; our ($opt_p, $opt_L); getopts('p:L'); # -p takes an argument, -L is a boolean flag print "p switch: $opt_p\n"; print "L switch: $opt_L\n"; #### 16:01 >perl 698_SoPW.pl -L -p foo p switch: foo L switch: 1 16:01 >