http://qs321.pair.com?node_id=686491


in reply to Extracting a file from .gz archive

There's no .tar involved !?

BTW: in addition to the valueable links already given, you could simply invoke the Zlib-module from CPAN:

... use IO::Zlib; my $file = "IpToCountry.csv.gz"; my $end_file = "IpToCountry.csv"; my $fh = IO::Zlib->new($file, 'rb'); if(defined $fh) { open my $fd, '>', $end_file or die "$end_file $!"; while(my $line = <$fh>) { print $fd $line } undef $fh; } ...

This will extract the .csv.gz to a .csv

Regards

mwa

Replies are listed 'Best First'.
Re^2: Extracting a file from .gz archive
by jonnyfolk (Vicar) on May 14, 2008 at 12:55 UTC
    This solution did the job perfectly. Thank you for your help.