in reply to Need Help with Sockets, Please
This should loop until the silicon wears out, but you'll probably want to put in some graceful shutdown mechanism within the first loop (and the second loop perhaps?). I'd also check out CPAN for some daemon type modules (e.g Net::Daemon and Net::TCP::Server).while($some_guaranteed_condition) { my $socket = IO::Socket::INET->new( ... ); while($line = <$socket>) { ... } $socket->shutdown(2); }
_________
broquaint
|
|---|