in reply to UNTAR in Perl

anu7

This is a simple routine to extract the zip:
use Data::Dumper; unzip_tree($file); print Dumper \@files; sub unzip_tree{ my $zip_file = shift; my $zip = Archive::Zip->new($zip_file); $zip->extractTree( "", "$tmpdir/" ); my @files = grep { -f "$tmpdir/$_"} readdir( UNZIPED ) ; close UNZIPED; @files = map { $_ = "$tmpdir/$_" } @files; return @files; }
Hope this helps

Replies are listed 'Best First'.
Re^2: UNTAR in Perl
by graff (Chancellor) on May 16, 2007 at 14:41 UTC
    Um... Does Archive::Zip work on tar files? (I haven't tried that, but I would not expect it to work.)