in reply to How to parse these command-line options?

Perhaps their a module, but my initial thought would be something fairly simple..
for(@ARGV) { if/^-/ $mode=$_; elsif($mode){$subTable{$mode}->($_);} else{#error or default mode} }
This would allow only one mode in effect at a time, so you wouldn't need to bother with 'turning -a off'. (Of course, if you want multiple modes on it becomes much more complicated so i'll just hope theres a module)

Replies are listed 'Best First'.
Re: Re: How to parse these command-line options?
by John M. Dlugosz (Monsignor) on Feb 05, 2003 at 22:56 UTC
    Yea, many different settings, all independant. Also, chainging one-letter switches, handling the values, and all that.