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


in reply to port scanner using nmap

No need to shell out... there's an API for that!