$ob->write("\x30\x31\x32");
while(1){
$gotit=$ob->lookfor();
if ($gotit) {
print "RX> ".$gotit."\n";
if($gotit eq "\x33"){
print "\t(a)\t".$gotit." eq \\x33\n";
}
if($gotit eq "33"){
print "\t(b)\t".$gotit." eq 33\n";
}
if($gotit eq "3"){
print "\t(c)\t".$gotit." qe 3\n";
}
$nnn=hex($gotit);
if($nnn eq "3"){
print "\t(d)\t".$gotit." eq hex(\$gotit)\n";
}
if($gotit == 3){
print "\t(e)\t".$gotit." == 3\n";
}
}
$ob->lookclear; # needed to prevent blocking
sleep (0.2);
}
####
30 31 32 012
33 3
####
RX> 3
(a) 3 eq \x33
(c) 3 qe 3
(d) 3 eq hex($gotit)
(e) 3 == 3
####
[RX]123
[TX]3