use Archive::Tar; # here's the slow approach to mucking with files in a tar set: my $tar = Archive::Tar->new( "some.tar" ); my @filenames = $tar->list_files; for my $filename ( @filenames ) { my $filedata = $tar->get_content( $filename ); # do other stuff... }