Most of the replies have focused on how to do this with external calls to tar 
or cpio, without actually addressing the original writer's problem, how to do 
it with Archive::Tar.

The first respondent noted that Archive::Tar doesn't do wildcarding. Or, as it 
is called in the Perl docs, globbing. What you need to do is create the file 
list yourself, and pass it to the call. There are a variety of ways you can do 
this: you can use the File::Find module to build up a list of files, or since 
you seem to be concerned with just the one directory you can use Perl's 
built-in globbing functionality with <*> (or with glob(), if you prefer). Look 
to the perlop manpage (under I/O Operators) for the <*> syntax, or perlfunc 
for glob().

Randy
-- 
-------------------------------------------------------------------------------
Randy J. Ray     | Men occasionally stumble over the truth, but most of them
[EMAIL PROTECTED] | pick themselves up and hurry off as if nothing had happened.
+1 650 930-9097  |   -- Sir Winston Churchill

Reply via email to