in reply to perl daemon, redirect STDIN to read from all ttys and print to STDOUT
Maybe this c program will help you, look at the c code and see what they do? sudosh
If you get your perl version working, be sure to post it. :-)