in reply to option on command line

I'm a big fan of the ternary operator in cases like this.
$var_for_opt_a = defined($opt_a) ? $opt_a : "some default value";
As the others said above, use one of the GetOpt modules as well.

thor