Working on a script that takes in arguments along with options and using the getopts package right now...
What I seem stuck on is how to implement it so that I can set some options that must be provided with arguments to work like in the usual unix shell getopts...
So for example, I have
getopts ('hd:', \%opts);
Right now, despite D having the ":" after it, it still works if I call
scriptname -d
without any arguments provided to it....
Anyone can give me a hand so that I can enforce this upon the option?
What I seem stuck on is how to implement it so that I can set some options that must be provided with arguments to work like in the usual unix shell getopts...
So for example, I have
getopts ('hd:', \%opts);
Right now, despite D having the ":" after it, it still works if I call
scriptname -d
without any arguments provided to it....
Anyone can give me a hand so that I can enforce this upon the option?