I think the best option would be to create the tunnels with IPC::Open2 and to use a unique perl process written around a select loop to control them and listen for new connections.
... though it's not clear to me to what kind of "ssh tunnels" the OP refers, if he is talking about using the stdin and stdout of the ssh process to tunnel data (as in tar cf - . |ssh foo tar xf -) or using ssh native support for tunnels (i.e. ssh foo -L1234:host:1234)
In reply to Re^2: Forking server for ssh tunnels
by salva
in thread Forking server for ssh tunnels
by tinypig
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |