in reply to Re: Better way to use File::Find and Archive::Tar
in thread Better way to use File::Find and Archive::Tar

Yes, I thought this too. But, the tar file gets created wrong. It looks like this:
./web_dir ./cgi-bin ./www ./etc
Here's what I changed in my code:
... chdir("$web_base/$web_to_del"); find(\&archive, "."); ...
When I un-tar it, all of the the files and directories underneath the web_dir are created separately instead of getting created under the web_dir.

Now if I just change into the directory directly above it, the tar file is created with just the web_dir and no other files or directories below it. Code:

... chdir("$web_base"); find(\&archive, "$web_to_del"); ...
I've tried a couple of other variations than this as well, but I get comparable (wrong) results.