in reply to Getopt::Long and default number

Try this:
my $opt = "0"; $result = GetOptions ("opt:s" => \$opt,); $opt = 100 if ($opt eq "");
I'm pretty sure there are some better way to perform this task, but can't figure out how right now.

surrender to perl. your code, your rules.