Else ur call to sysread/write may just block.
see "perldoc IO::Select".
-Sharad
-Original Message-
From: Gupta, Sharad
Sent: Monday, June 23, 2003 3:36 PM
To: 'McMahon, Christopher x66156'; [EMAIL PROTECTED]
Subject: RE: basic question: handling input to TCP/IP server
Someth
quot;.
-Sharad
-Original Message-
From: Gupta, Sharad
Sent: Monday, June 23, 2003 3:36 PM
To: 'McMahon, Christopher x66156'; [EMAIL PROTECTED]
Subject: RE: basic question: handling input to TCP/IP server
Something like this worked for me in the past:
use strict;
use IO::S
more lines of code and I'll be impersonating the New York Stock
Exchange!
-Chris
-Original Message-
From: Gupta, Sharad [mailto:[EMAIL PROTECTED]
Sent: Monday, June 23, 2003 4:41 PM
To: McMahon, Christopher x66156; [EMAIL PROTECTED]
Subject: RE: basic question: handling in
Something like this worked for me in the past:
use strict;
use IO::Socket::INET;
my $sock = IO::Socket::INET();
while(1) {
my $output;
my $n = sysread($sock,$output,1000);
last if(!defined($n));
print STDOUT $output;
}
And using syswrite() for writing.
perldo