It may be the trailing new line character? Or maybe you need even more clean up than that to extract the information you need to put on the tar command line? chomp @tarfiles; may help.
Note: always use strictures (use strict; use warnings;). The missing my in front of @tarfiles=`ls dirname`; implies either you don't, or your scope for @tarfiles is too large.
In reply to Re: tar a files from loop
by GrandFather
in thread tar a files from loop
by sandy1028
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |