in reply to Error using system() and tar with several options

my @args = ("/bin/tar", "czv --exclude-from=$excludes -f ", $storage +Location.$archiveName, $archiveDir ); system(@args) == 0 or die "system @args failed: $?";
The logical reason for tar choking on this is that it sees a -b flag, the logical reason for this is that you have an effective call to
tar -czv -fbackup.tar.gz
Put a space after the -f flag to resolve, that said, why are you replacing the shell script by having Perl spawn shells instead?

Replies are listed 'Best First'.
Re^2: Error using system() and tar with several options
by gctaylor1 (Hermit) on Apr 14, 2009 at 19:59 UTC
    This may seem odd, but I'm desperate for a project to work on and this seemed like something to do. Being a novice it's hard to find a project to jump in on.

    I'm burned out from doing book exercises and never really liked doing random exercises just for the sake of doing exercises. So this is practical from a project point of view even if it is impractical from a resource usage point of view.

    I do have this book on order Perl Testing: A Developer's Notebook and am reading Programming Perl but again, I need something to gain experience with and is practical.