Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

murrayn's scratchpad

by murrayn (Sexton)
on Dec 12, 2011 at 05:38 UTC ( [id://943022]=scratchpad: print w/replies, xml ) Need Help??

Trying to use Archive::Tar. My perl code lives in one path and, given the need to maintain some consistency and structure, I don't want to have to execute that code in the source directory of the files to be bundled into the archive which is in a totally different tree. My code... $tar->setcwd($vsvroot); foreach my $vsvxdb (<cntl/*>) { $tar->add_files($vsvxdb); } $tar->write("$vsvroot/tmp/cntlbkup.tar"); The file $vsvroot/tmp/cntlbkup.tar is created but empty. The problem appears to be that the "foreach $vsvxdb" is trying to find "cntl/*" in the perl code's directory. I have tried using $tar->cwd($vsvroot); as well.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (2)
As of 2025-07-19 17:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.