in reply to Re^2: Send Bash Command
in thread Send Bash Command

I changed the qq() to q() and I do not get the warnings anymore. But still the script is hanging.

Replies are listed 'Best First'.
Re^4: Send Bash Command
by Anonymous Monk on Mar 03, 2010 at 01:20 UTC
    But still the script is hanging.

    I think its waiting for input, not hanging.

      What do you mean waiting for an input? Did it spawn a shell prompt?

        Yes.

        By the way, $|=1; won't affect IN, just the currently selected handle (STDOUT). The easiest way to turn on autoflushing for another handle is

        use IO::Handle; IN->autoflush(1);

        But what about buffering in the other direction. Unfortunately, you can't really control any buffering the child might do to its output. If you need interactivity, you should have better luck with Expect since it uses ptys to communicate with the child, and that usually causes the child to avoid buffering.

        bash is a shell, so when you launch bash, you get shell prompt