note
IlyaM
Something like this should work:
<code>
use IPC::Run qw(run);
my ($out, $err) = ('', '');
run(['/path/to/prog', @args],
'>', sub { $out .= $_[0]; print $_[0] },
'2>', sub { $err .= $_[0]; print $_[0] });
</code>
<p>
<font color="grey" size="-2">
--<br>
Ilya Martynov, <a href="mailto:ilya@iponweb.net">ilya@iponweb.net</a><br>
CTO IPonWEB (UK) Ltd<br>
Quality Perl Programming and Unix Support
UK managed @ offshore prices - <a href="http://www.iponweb.net">http://www.iponweb.net</a><br>
Personal website - <a href="http://martynov.org/">http://martynov.org</a><br>
</font>
274875
274975