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
#!/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]";
Results:
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]