my $status = `gzip -cd filename 2>&1`; print "The status is:$status\n"; if (!($status eq '')) { print " ERROR : $file is corrupt. \n"; return 0; }