in reply to redirecting input to console

If you are using ActivePerl (Sounds like it) try getting the Expect module from PPM, else take a look at Expect. It lets you control input to other programs.

-Waswas