Check out IPC::Run2 or IPC::Run3 (I use the latter even when I don't care about STDERR).
If you're really tricky, you can run your cli.pl with IPC::Run#, then fork off a reader that reads the STDOUT and saves to disk leaving your initial process to write to cli.pl without ever having to worry about blocking.
In reply to Re: How to redirect STDIN and STDOUT to the particular perl script
by Tanktalus
in thread How to redirect STDIN and STDOUT to the particular perl script
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |