Please provide more information about the error. For example what kind of file names you have and the directory structure. system may split the argument string to words possibly corrupting argument vector if the file name contains whitespaces. You would be safer using systems LIST argument format. For example,
Note, untested code.@count=`find dir_name -name *.tar`; @args = qw( tar -x -f ); foreach $cnt(@count){ push @args, $cnt; system(@args) == 0 or die "system '@args' failed: $?"; pop @args; }
In reply to Re: Tar a files
by puudeli
in thread Tar a files
by sandy1028
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |