in reply to Re: Newbie: Pipe/STDIN Clarification
in thread Newbie: Pipe/STDIN Clarification
Or better yet, use the 3-arg open call -- and while we're at it, let's provide the command as an array, and get the process-ID:open my $fh, '| command' or die $!;
(The form of open call shown by AnonyMonk would be for running a command so that you can read its output, and you wouldn't write to that file handle.)my @command = qw/downstream_process -a option1 -b option2 -etc/; my pid = open( my $fh, '|-', @command ) or die $!;
|
|---|