in reply to a problem with arrays and undeffing i think
A cleaner way of representing your set of files is with a hash:foreach $oFile(@FileList) { next unless defined $oFile; if ($oFTP->put("p:/charts/Sendtray/$oFile")) { if (move("p:/charts/Sendtray/$oFile","p:/charts/Sendtray/G +ONE/$oFile")) { &LogSentFiles($oFile); $oFile = undef; } } }
Then as the files are moved, you may delete them from the hash. -Markforeach (keys %Dir) { $FileSet{$_}++ unless $_ eq "." || $_ eq ".." || $_ eq "GONE" || $_ eq ""; }
|
|---|