The error message is coming directly from gzcat. The open() call succeeded.
If you need to verify the existence of the file, check that before you open the pipe. e.g.:
my $file = '/home/me/file.zip.gz'; die "no such file '$file'" unless -f $file; my $cmd = "gzcat $file |"; open(IN, $cmd) or die "open failed: $!";
In reply to Re: Pipe Error Trapping
by herveus
in thread Pipe Error Trapping
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |