in reply to Testing a command line argument

Use the bind operator (=~) instead of eq for regular expressions, and the parens are in the wrong place:
if ( $ARGV[1] =~ /^(ALL|0)$/i ) {

Replies are listed 'Best First'.
Re^2: Testing a command line argument
by mike65535 (Novice) on Dec 10, 2015 at 17:58 UTC
    Thanks for the "bind" tip.

    Sorry for the parens mistake (and the ensuing trouble it caused!) I have to use a separate computer to develop code on from the one on which I have Internet access so it's difficult to lift the code directly (without burning a CD, believe it or not).

    Thanks again.