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 reply to Re: Command Line Arguments
by hel0
in thread Command Line Arguments
by Adam
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |