The stupid question is the question not asked | |
PerlMonks |
murrayn's scratchpadby 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. |
|