....
while(defined($line = <SOCK>))
{
if ($line == "")
{
print $line;
}
else
{
print "It does not come in this line"
}
}
....
How do i change read into a nonblocking call? I just want process to
wait for 5secs on read.
The select($line=<SOCK>,undef,undef,5) does not help me, or I am using
it is wrong way.
Thanks
Dinesh Verma
Sent via Deja.com http://www.deja.com/
Before you buy.
In article <811mnj$9kr$1...@nnrp1.deja.com>,
dino...@hotmail.com wrote:
> Hi,
> I have a small piece of TCP/IP client side code, which connects to
> server and start reading.
>
> ....
You are using it the wrong way. perldoc -f select and perldoc perlipc.
--
<kra...@pobox.com> Kragen Sitaker <http://www.pobox.com/~kragen/>
The Internet stock bubble didn't burst on 1999-11-08. Hurrah!
<URL:http://www.pobox.com/~kragen/bubble.html>
> How do i change read into a nonblocking call? I just want process to
> wait for 5secs on read.
Checkout perlfaq8:
How do I timeout a slow event?