You haven't looked at what your target filenames actually are, even though the error message tells you that they are bad. Do:
for my $target (@array) { print "Trying to store [$target]\n"; };
Then you will see that each target filename still has a newline appended. See chomp on how to remove them, or consider just stripping all trailing whitespace:
for my $target (@array) { $target =~ s/\s+$//; print "Storing [$target]\n"; $ftp->put( $target ); };
In reply to Re: Net::FTP usage
by Corion
in thread Net::FTP usage
by kafkaf55
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |