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: $!";