in reply to Closing IO::Socket::INET
You can use the Reuse argument in the IO::Socket::INET constructor:
my $lis = IO::Socket::INET->new(LocalPort => $portnumber, Reuse => 1, Listen => 10 );
Doing this will set the SO_REUSEADDR option on the new socket. Without it, you'll have to wait a few minutes between exiting & restarting.
-- vek --
|
|---|