you are getting a true boolean value 1, which means when the option is present, you are just storing the return value of defined($options{o})
try ? :
my $source_file = defined($options{o}) ? "<some filename>" : "as.xcf-d +ist" ;
In reply to Re: checking $option
by targetsmart
in thread question about getopt
by Sun751
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |