in reply to How to parse these command-line options?
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)for(@ARGV) { if/^-/ $mode=$_; elsif($mode){$subTable{$mode}->($_);} else{#error or default mode} }
|
|---|
| 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 |