in reply to a problem with arrays and undeffing i think

If you want use $oFile = undef as a done flag, test to see if the @FileList entry equals undef before processing:
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; } } }
A cleaner way of representing your set of files is with a hash:
foreach (keys %Dir) { $FileSet{$_}++ unless $_ eq "." || $_ eq ".." || $_ eq "GONE" || $_ eq ""; }
Then as the files are moved, you may delete them from the hash.

-Mark