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

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

Replies are listed 'Best First'.
Re^4: GetOptions and help
by chargrill (Parson) on Mar 16, 2006 at 13:15 UTC

    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[$%++]}
Re^4: GetOptions and help
by Anonymous Monk on Mar 16, 2006 at 13:26 UTC
    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 .