http://www.perlmonks.org?node_id=873577


in reply to Re: Parsing command line options without knowing what they are
in thread Parsing command line options without knowing what they are

This is the first thing I tried, but it doesn't do what I want. Yes, you can give it a hash reference and it will dump options in there, but you still have to name all the options that you want to support in the GetOptions() call. I have currently about 300 options that are supported, and this set will change over time. I don't want to have to keep going back to this code and changing the list here every time we add a new feature or remove an old one. What I need is something where I can give it a hash and it fills it up with whatever it finds on the command line without having to name each possible option.

--DrWhy

"If God had meant for us to think for ourselves he would have given us brains. Oh, wait..."