zentara has asked for the wisdom of the Perl Monks concerning the following question:
############################################!/usr/bin/perl -w use strict; use Archive::Tar; use File::Find; my $tar = Archive::Tar->new(); my $dir = 'somedir'; #some dir with recursive dirs and files my @files; find (\&found,$dir); sub found{ push @files,$File::Find::name; } $tar->add_files(@files); $tar->write('Tmytest2.tgz',9); exit;
#!/usr/bin/perl -w use strict; use Archive::Tar; use File::Find; my $tar = Archive::Tar->new(); my $dir = "somedir"; #some dir with recursive dirs and files find (\&found,$dir); sub found{ $tar->add_files($File::Find::name); } $tar->write('Tmytest2.tgz',9); exit;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
•Re: Using Archive::Tar with File::Find
by merlyn (Sage) on Jan 07, 2003 at 00:00 UTC | |
|
Re: Using Archive::Tar with File::Find
by Aristotle (Chancellor) on Jan 07, 2003 at 01:56 UTC |