in reply to I want to run a script from another script, use the same version of perl, and reroute IO to a terminal-like textbox

From the documentation for do, it doesn't look like it's really for capturing output. Would IPC::Run3 help you? I suppose you could manipulate file descriptors, though that could get hairy and sounds like a Bad Idea. I would try to rethink the problem in terms of IPC::Run3.
  • Comment on Re: I want to run a script from another script, use the same version of perl, and reroute IO to a terminal-like textbox

Replies are listed 'Best First'.
Re^2: I want to run a script from another script, use the same version of perl, and reroute IO to a terminal-like textbox
by ric00015 (Beadle) on Oct 01, 2013 at 15:17 UTC

    I didn't see Run3, but IPC::Run certainly has all the capturing I could ever use. The problem is that I need to pass the hash, and I don't know how to do that outside of 'do'.

    The other problem is that I want all scripts called from the main script to use the same version of perl. I don't know if IPC::Run sets the perl version or environment for the child processes (although now I say it like that, it might).

    I too am against Bad Ideas, and in any case, I don't even know how to manipulate file handlers. So that's not happening :)

Re^2: I want to run a script from another script, use the same version of perl, and reroute IO to a terminal-like textbox
by ric00015 (Beadle) on Oct 01, 2013 at 15:35 UTC

    I found ICP::Run3, but it seems it doesn't allow interaction with the sub-processes, which is necessary for some child scripts. All the other drawbacks from Run are also present in Run3. Thanks for the idea though! Keeps me on my toes.