in reply to Is it possible to detect "no file" error in open2 ?
It gives the error:#!/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: $!");
open2: exec of /no/such/command failed at ./655683.pl line 10
|
|---|