in reply to Re^2: Waiting for input, without sleep
in thread Waiting for input, without sleep
while($data = $sock->peek()){ if($data eq $what_you_want){ &DO_YOUR_STUFF; last; }else{ sleep 1; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Waiting for input, without sleep
by Trihedralguy (Pilgrim) on Jun 30, 2009 at 16:12 UTC | |
by jrsimmon (Hermit) on Jun 30, 2009 at 16:28 UTC | |
by Trihedralguy (Pilgrim) on Jun 30, 2009 at 16:36 UTC | |
by jrsimmon (Hermit) on Jun 30, 2009 at 16:45 UTC | |
by Trihedralguy (Pilgrim) on Jun 30, 2009 at 16:51 UTC |