use strict; use warnings; use Archive::Extract; my $file = "Testing.xls.gz"; my $ae = Archive::Extract->new(archive => $file); unless(my $ok = $ae->extract){ print "There was an error: $ae->error"; } #### 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";