http://www.perlmonks.org?node_id=839936


in reply to Checking Port Open or Close

You can use IO::Socket::PortState module. I used this module only.