in reply to Optimized remote ping
Use Net::Oping. I'm not sure if it's possible to set the destination port.