getopt('st',\%opt); if ($opt{'t'}) { $test = 1; ## testing } elsif ($opt{'s'}) { $test = 0; ## not testing }