my $pid; eval { $pid = open2(\*OUT, \*IN, "NotThere ..." ); }; if ($@ and $@ =~ /^open2:/) { die "$@: $!\n"; }