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 --In reply to Re: Closing IO::Socket::INET
by vek
in thread Closing IO::Socket::INET
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |