> dan radom <[EMAIL PROTECTED]> said:

You have a logic error.  The if test should be:

if (! ( $status eq 1 || $status eq 2)) {

> #if (( $status ne 1 ) || ( $status ne 2 )) {

A few other "style" pointers follow:

You can replace this:

if ( $#ARGV+1 !=2) {

with

if ( @ARGV != 2) {

@arrayname returns the number of elements in an array in a scalar context.

You can also do this to retrieve arguments:

$port = shift @ARGV;
$up_down = shift @ARGV;

You also do not have to "chomp" the arguments on the command line.  There 
should not be any newline characters present in the ARGV array.

For generalized argument processing take a look at:

perldoc Getopt::Std


-- 
Smoot Carl-Mitchell
Consultant

-- 
Smoot Carl-Mitchell
Consultant



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to