in reply to Re: GetOptions and help
in thread GetOptions and help

None of the options are mandatory and I don't want them to be. Hence the question still remains . Unless you are suggesting that I have to check for each arguments existence e.g.
usage() unless $res or $mod or $upd
This seems an untidy way to do it ?

Replies are listed 'Best First'.
Re^3: GetOptions and help
by fishbot_v2 (Chaplain) on Mar 16, 2006 at 12:59 UTC

    If none of the options are mandatory, why would you print usage in the second case?

      I think the OP means "at least one option is mandatory", not "no options are mandatory".



      --chargrill
      $,=42;for(34,0,-3,9,-11,11,-17,7,-5){$*.=pack'c'=>$,+=$_}for(reverse s +plit//=>$* ){$%++?$ %%2?push@C,$_,$":push@c,$_,$":(push@C,$_,$")&&push@c,$"}$C[$# +C]=$/;($#C >$#c)?($ c=\@C)&&($ C=\@c):($ c=\@c)&&($C=\@C);$%=$|;for(@$c){print$_^ +$$C[$%++]}
      If I am presented with a program and I don't know what it does or what options are available, I can hazard a guess that there's some kind of help for it. I'd use -h (or perhaps -?) in the first instance and if that didn't work just run the program and see what happens. If nothing is displayed in the second instance I'm none the wiser , hence the requirement to display a help screen .