Bareword Found where operator expected
$dec93 = 93;
$ser = SERVO; $lbit = uc(sprintf("%02x\n", $dec93)); if($lbit == 5D){ print DATA "Byte11: $fbits11=$bstr11 Bits:[95-88]\t$ser\n"; }else{ sleep(1); } Why do I get this error? Bareword found where operator expected at C:\Perl Scripts\Lbits.pl line 64, near "5D" (Missing operator before D?) |
Uh, quote your 5D.
|
Quoting produced the following:
Argument "5D" isn't numeric in numeric eq (==) at C:\Perl Scripts\Lbits.pl line 64. Argument "5D\n" isn't numeric in numeric eq (==) at C:\Perl Scripts\Lbits.pl line 64 but this did the trick: if($lbit =~ /5D/) |
All times are GMT -5. The time now is 04:11 PM. |