in reply to Re: Use of IPC::Run rather than system()
in thread Use of IPC::Run rather than system()
It doesn't help if you want to capture STDERR and STDOUT in separate scalars.
To answer gmarler's question: if you just want to capture STDERR and STDOUT for an external program then it is rather easy to do with IPC::Run:
use IPC::Run qw(run); my($out, $err); run ['/path/to/prog', 'arg1', 'arg2'], '>', \$out, '2>', \$err;
You can find more complex examples in following nodes:
- Re: Timing External Program Execution
- Re: system, pipes, shell, quoting
- Re: SIGINT in system() with shell metachars
--
Ilya Martynov, ilya@iponweb.net
CTO IPonWEB (UK) Ltd
Quality Perl Programming and Unix Support
UK managed @ offshore prices - http://www.iponweb.net
Personal website - http://martynov.org
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Re: Use of IPC::Run rather than system()
by gmarler (Sexton) on Jul 16, 2003 at 18:01 UTC | |
by Aristotle (Chancellor) on Jul 16, 2003 at 18:33 UTC | |
by IlyaM (Parson) on Jul 16, 2003 at 19:18 UTC | |
by gmarler (Sexton) on Jul 17, 2003 at 02:04 UTC | |
by IlyaM (Parson) on Jul 17, 2003 at 07:18 UTC |
In Section
Seekers of Perl Wisdom