- or download this
#create the listen socket
my $listen_socket = IO::Socket::INET->new(LocalPort => 8000,
Listen => 10,
Proto => 'tcp',
Reuse => 1);
- or download this
#write to the client socket
print $connection "Hello Client!";
#read from the client socket
my $message = <$connection>;
- or download this
#set the sig handler for when a child dies
$SIG{CHLD} = \&REAPER;
...
#reset the sig for the next child to die;
$SIG{CHLD} = \&REAPER;
}
- or download this
$SIG{CHLD} = 'IGNORE'; - or download this
#!/usr/bin/perl -w
use strict;
use IO::Socket;
...
}
}
}