Perl: the Markov chain saw | |
PerlMonks |
Re: Storing multiple arguments in a data structure that allows for future expansionby Moron (Curate) |
on May 02, 2007 at 08:57 UTC ( [id://613139]=note: print w/replies, xml ) | Need Help?? |
I use a hash for the options whose keys are option letters and whose values can be either a scalar for a single or empty value or an array reference for multiple values, e.g.:
And to iterate the combinations of the arrays, see Math::Combinatorics. Update: and if you have to support protected commas in quotes, instead of just splitting, parse with something like Text::Csv::Simple
__________________________________________________________________________________
^M Free your mind!
In Section
Seekers of Perl Wisdom
|
|