$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); }