use strict; use warnings; use IO::Uncompress::Gunzip qw(gunzip $GunzipError); my $file = "Testing.xls.gz"; my $out = "Testing.xls"; my $status = gunzip $file => $out or die "gunzip failed: $GunzipError\n";