Thanks. That got it.
dan
* Jeff 'japhy/Marillion' Pinyan ([EMAIL PROTECTED]) wrote:
> On Sep 3, dan radom said:
>
> >if ( $#ARGV+1 !=2 ) {
>
> That's better written as:
>
> if (@ARGV != 2) {
>
> > print "\n";
> > print "usage cat.pl port up\/down\n";
> > print "\n";
> > exit;
> >}
>
> >#if (( $status ne 1 ) || ( $status ne 2 )) {
> ># print "\n";
> ># print "port status must be either up or down\n";
> ># print "\n";
> ># exit;
> >#}
>
> Your logic is off. You want &&, not ||.
>
> if ($status != 1 and $status != 2) {
>
> --
> Jeff "japhy" Pinyan [EMAIL PROTECTED] http://www.pobox.com/~japhy/
> RPI Acacia brother #734 http://www.perlmonks.org/ http://www.cpan.org/
> ** Look for "Regular Expressions in Perl" published by Manning, in 2002 **
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]