|No such thing as a small change|
Re: Creating Tarballs in a perl scriptsby morgon (Deacon)
|on Jun 11, 2012 at 15:55 UTC||Need Help??|
First of all: Do you really want the outout of tar?
If not you should not use backticks but system.
Then it all depends on what your variables acually contain as the string you use inside the backticks will be interpreted by a shell.
If for example your $DEST variable contains "/tmp/*" then it is clear why no hidden files make it to the tar-archive - the shell globs "*" and will not pass any hidden files to tar.
The shell used in backticks is usually /bin/sh (not bash - bash-settings are irrelevant here).
If your $DEST does not contain shell meta-characters then I cannot see any reason why your command should not work, but that would not be a Perl-related problem.
Finallly if you use system you can avoid a shell by calling it like