in reply to Closing Sockets with IO::Socket::INET
You are going to have to provide more information in order to properly diagnose the problem. You say "I'm using IO::Socket::INET to listen for incoming data, and I want to be able to close this port within my script." You do know that this socket cannot be used to initiate a connection. This socket is designed to take inbound requests from other applications. I think you need to provide a code snippet that better typifies your action.