in reply to IO::Socket persisting on Linux despite being closed (updated)
my $socket = IO::Socket::INET->new( ReuseAddr => 1, [download]
Socket options are documented in socket;7 man 7 socket
Your server could be blocking on a <$fh> call if that doesn't work.