in reply to Re^4: Use of IPC::Run rather than system()
in thread Use of IPC::Run rather than system()
Something like this should work:
use IPC::Run qw(run); my ($out, $err) = ('', ''); run(['/path/to/prog', @args], '>', sub { $out .= $_[0]; print $_[0] }, '2>', sub { $err .= $_[0]; print $_[0] });
--
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^4: Use of IPC::Run rather than system()
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