while($response = $sock->peek()) { if ($response ne '') { #verify the data print "Server Response: $response\n"; $response = (string2hex($response)); print "Server Response: $response\n"; last; } else { sleep 1; print "Waiting for a response!\n"; } }
In reply to Re^4: Waiting for input, without sleep
by Trihedralguy
in thread Waiting for input, without sleep
by Trihedralguy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |