Any Expect.pm experts here? tcl expect lets you do stuff like this with interact:
interact { -reset $CTRLZ {exec kill -STOP [pid]} \001 {send_user "you typed a control-A\n"; send "\001" } $ {send_user "The date is [exec date]."} \003 exit foo {send_user "bar"} ~~ } But $object->interact( ""\*FILEHANDLE, $escape_sequence"") interact() is essentially a macro for calling inter connect() for connecting 2 processes together. \*FILEHANDLE defaults to \*STDIN and $escape_sequence defaults to undef. Interaction ceases when $escape_sequence is read from FILEHANDLE, not $object. $object's listen group will consist solely of \*FILEHANDLE for the duration of the interaction. \*FILEANDLE will not be echoed on STDOUT. which appears considerably less flexible. I want to interact until the spawned process outputs something. What are listen groups anyway?