http://qs321.pair.com?node_id=98723


in reply to launching another program but using the existing socket

If you want an inetd type program which will execute another program where the program's stdin and stdout will be the socket, you can do something like:
open(STDOUT, '>&'.fileno($socket)); open(STDIN, '<&'.fileno($socket)); exec("$program_path");