in reply to Command Line Arguments
I would do something like this:
But it's all just a matter of personal preference I guess. I don't like creating objects for simple things like parsing the commandline. Regular expressions will also offer you much greater flexibility! Hel0my %ArgumentState(); foreach (@ARGV) { SWITCH: for ($_) { /^a/i && do { $ArgumentState{'foo'}='bar'; last; }; /^b/i && do { &Do_something_here; last; }; }; };
|
---|
In Section
Seekers of Perl Wisdom