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
system("/bin/tar", "-cfz", $output_file, $directory)
In reply to Re: Creating Tarballs in a perl scripts
by morgon
in thread Creating Tarballs in a perl scripts
by mdw1982
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |