in reply to Options with optional values and condititions
But IMHO, 'options with optional values' are too ambiguous and I've never seen a need for such, so if you are going to have an option, you should either have a required value or no value at all.if ($foo) { print "foo option used with optional value: $foo \n"; } elsif (defined $foo) { print "foo option used with no optional value \n"; } else { print "foo option not used at all \n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Options with optional values and condititions
by Anonymous Monk on Oct 02, 2012 at 18:47 UTC | |
by runrig (Abbot) on Oct 02, 2012 at 18:50 UTC |