my @args = ("/bin/tar", "czvf", $storageLocation.$archiveName, $archiveDir );
system(@args) == 0 or die "system @args failed: $?";
####
tar -czvf - -g $BACKEDUP --index-file $INDEXFILE --exclude-from $MYEXCLUDES --totals /home/user1/ | ssh remote_machine "cat > /mnt/mount_point/dir1/$FILENAME"
####
#!/usr/bin/perl
use strict;
use warnings;
my $excludes = "/home/user1/scripts/perl/backup/excluded_files.txt";
my $storageLocation = "/mnt/mount_point/dir1/";
my $archiveName = "backup.tar.gz";
my $archiveDir = "/home/user1/temp";
my @args = ("/bin/tar", "czv --exclude-from=$excludes -f", $storageLocation.$archiveName, $archiveDir );
system(@args) == 0 or die "system @args failed: $?";
####
/bin/tar: Old option `b' requires an argument.
Try `/bin/tar --help' or `/bin/tar --usage' for more information.
system /bin/tar czv
--exclude-from=/home/user1/scripts/perl/backup/excluded_files.txt -f
/mnt/mount_point/dir1/backup.tar.gz /home/user1/temp failed: 5
12 at /tmp/filename.pl line 12.