- or download this
getopt('oDI'); # -o, -D & -I take arg. Sets $opt_* as a side e
+ffect.
getopt('oDI', \%opts); # -o, -D & -I take arg. Values in %opts
- or download this
#!perl
use Getopt::Std;
...
for (keys %opts) {
print '$opts{', $_, '} = "', $opts{$_}, "\"\n";
}
- or download this
C:\myperl\temp>perl temp.pl -z
...
C:\myperl\temp>temp -z -z
$opts{z} = "-z"