abcdefg has asked for the wisdom of the Perl Monks concerning the following question:
Hi All, I am trying to add "OR" option in command line args to my perl script.I did used command line like
Usage: $scriptname (-p <product_type> -i <input_filename> -o <output_f +ilename> )
Now I want user to have the option of either giving -i <input_filename> or -h <image_filename>. How can I do that?? I tried doing following which definitely didnt work.
Usage: $scriptname (-p <product_type> -i <input_filename>|| -h<image_f +ilename> -o <output_filename> )
Also after giving this option how can I use if else for command line. I mean if user give option -i<input_filename> do this else if user give -h<image_filename> do that???
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: The command line arguments
by dasgar (Priest) on Apr 04, 2012 at 16:49 UTC | |
|
Re: The command line arguments
by toolic (Bishop) on Apr 04, 2012 at 16:54 UTC |