In other words, not having $opt_l should NOT be an error... only a NULL $opt_l. And in perl, is there a difference?if ($opt_l) { print "Option found: l\n"; print " with value: $opt_l\n"; } else { print "You must specify -l\n"; exit 1; }
In reply to RE: Re: Getopts and required args
by husker
in thread Getopts and required args
by husker
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |