http://www.perlmonks.org?node_id=686484

jonnyfolk has asked for the wisdom of the Perl Monks concerning the following question:

I am downloading a file via a remote script, and I need to decompress it, which I've never done before. The printout reports no errors but neither does it create the file! I am not clear on what I should be doing here!
#!/usr/bin/perl -w use strict; use CGI ':standard'; use Archive::Tar; my $file = "/home/mm/IpToCountry.csv.gz"; my $end_file = "/home/mm/IpToCountry.csv"; print header(); my $tar = Archive::Tar->new; my $tar_errors = $tar->error(); $tar->read($file,1); $tar->extract($file, $end_file); print p("Tar errors ($tar_errors)");