in reply to File list from gz file without reading everything into memory

open(my $fh, '-|', tar => 'tzf', $archive) or die; chomp( my @files = <$fh> );

It'll have to uncompress the whole file, but it shouldn't keep any of it in memory

Update: Doh! I just noticed you're on Windows. By that, I presume you mean you don't have the tar tool.

Replies are listed 'Best First'.
Re^2: File list from gz file without reading everything into memory
by drblove27 (Sexton) on Nov 18, 2009 at 21:57 UTC
    Yeah no tar tool.. though I am sure I can find something with a command line for windows that I could call out too... When I use the code that I provided my system runs out of memory, i.e. I can not un-tar.gz this file using the Archive::Tar tool...

      It might not be an option for you but it looks like tar is included with Cygwin. Might be worth a try.

      Cheers,

      JohnGG