Hi,
I have the following code in my script test.pl which gets command line options.
getopts("ciphdvs:",\%opts); ## help if($opts{h}){
I can run the script without any options, but if it's run with an option that's not available, e.g. 'test.pl -b' I want to print the help message. How can I test for an undefined option?
Thanks for any help.
In reply to test for unknown option in getopts by js1
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |