in reply to Re: Capturing errors from 3-arg pipe open in ActivePerl 5.020
in thread [SOLVED] Capturing errors from 3-arg pipe open in ActivePerl 5.020
Sorry, I feel a bit dense here, but what do I do with the PID once I have it? I get a PID regardless of whether or not the command succeeded.
pipe.pl
Results:#!/usr/bin/perl use 5.018; use strict; use warnings; my $pid = open (my $ARTICLE, "-|", "caesar") or die "Can't start caesa +r: $!\n$^E"; my $read = <$ARTICLE>; say "[$read][$pid]";
perl pipe.pl 'caesar' is not recognized as an internal or external command, operable program or batch file. Use of uninitialized value $read in concatenation (.) or string at pip +e.pl line 9. [][1236]
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Capturing errors from 3-arg pipe open in ActivePerl 5.020
by Lotus1 (Vicar) on Nov 16, 2015 at 18:53 UTC |