mike65535 has asked for the wisdom of the Perl Monks concerning the following question:
I have some code that's wrapped with a test:
I want to improve that test to be case-Insensitive and also to include the numeric '0'.if( $ARGV[1] eq "ALL" )
Like this
but it appears that's not a valid implementation (not sure what it does!)if ( $ARGV[1] eq (/^ALL|0)$/i) )
Thanks for your help!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Testing a command line argument
by toolic (Bishop) on Dec 10, 2015 at 17:35 UTC | |
by mike65535 (Novice) on Dec 10, 2015 at 17:58 UTC | |
|
Re: Testing a command line argument
by BillKSmith (Monsignor) on Dec 10, 2015 at 20:33 UTC | |
|
Re: Testing a command line argument
by james28909 (Deacon) on Dec 10, 2015 at 17:37 UTC | |
by choroba (Cardinal) on Dec 10, 2015 at 17:46 UTC | |
|