in reply to system, pipes, shell, quoting
Simpliest solution: break dependacy on shell. Just don't use it: replace system with IPC::Run and you don't need to call shell to pipe output from one program to another anymore.
use IPC::Run qw(run); run([$program1, $file1], '|', [$program2, '-x', '-y'], '|', [$program3], ">$file2", '2>/dev/null') or die "Error: $?";
--
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: system, pipes, shell, quoting
by superpete (Beadle) on Nov 13, 2002 at 08:29 UTC | |
by IlyaM (Parson) on Nov 13, 2002 at 08:39 UTC |
In Section
Seekers of Perl Wisdom