If I turn on warnings, diagnostics, and strict I get the following errors:if ($VAR1 != 2 || $VAR1 ne /^[+-]?\d+$/ ) { do something; }
If I remove warning, strict, and diagnostics, the script works fine. Is there anything I can do to clean this script up such that I can leave strict, warning, and diagnotics in, without getting the error? Thanks in advance.[root@monitor app]# ./checker 10.175.193.55 Argument "External command error: Error in packet\nReason: (noSuch..." + isn't numeric in numeric ne (!=) at ./checker line 106 (#1) (W numeric) The indicated string was fed as an argument to an oper +ator that expected a numeric value instead. If you're fortunate the me +ssage will identify which operator was so unfortunate. Argument "External command error: Error in packet\nReason: (noSuch..." + isn't numeric in numeric ne (!=) at ./checker line 147 (#1) Controller Status Change Array Accelerator Battery
In reply to if multiple conditions & Warinings.... by sami.strat
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |