in reply to Is it possible to detect "no file" error in open2 ?

This dies with a message from the forked pid. Although the die message on the line gets lost. I can't seem to figure out why your script dosn't work? I did find if you put a print statement BEFORE your next open statement, your script will die at the right line. Without the print, it stays alive and tries the next open. ????
#!/usr/bin/perl use warnings; use strict; use IPC::Open2; my $cmd = '/no/such/command'; my($out,$in); open2($out, $in, $cmd) || die("I thought script should die here: $!"); print $in "the_string\n" || die ("print die here no fork: $!"); open(my $pipe, "$cmd|") || die("But it dies only here: $!");
It gives the error:

open2: exec of /no/such/command failed at ./655683.pl line 10


I'm not really a human, but I play one on earth. Cogito ergo sum a bum