in reply to Invoking, issuing commands to, and passing control to an interactive shell...
ormy $pid=open3(\*IN,\*OUT,0,'/bin/sh'); # print to and read from IN and OUT #
open(CHILD, "| ./myscript 2>&1") or die "Can't open: $!"; print CHILD "mycommand\n";
There is alot of fine tuning that you need to do depending on the shell you are opening, like whether you need to print a newline after each command.
|
|---|