in reply to Command Line Argument Processing
Update: after looking at Getopts::Long again, it needs to be more like this, with repeated -c options:-c:'field_1=value_1','field_2>value_2'
This can be parsed with-c 'field_1=value_1' -c 'field_2>value_2'
but you will still need to break out the field names and values from each element of the array @opt_c with a regex, something likeuse Getopt::Long; our @opt_c; GetOptions("c=s@"); print join ", ", @opt_c;
/^(.*?)([<=>])(.*)/
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Command Line Argument Processing
by Anonymous Monk on Nov 27, 2006 at 09:04 UTC |