I would like to create a perl script that will copy a file from my ftp directory to a different directory once it has successfully uploaded to my server. I want to verify that it was successfully uploaded by looking at the /var/log/xferlog and then if I can parse out a successful message for the given filename it would move it away from the directory immediately. I would have this run in a cron job and need it to be completely automated. For example if 5 files were uploaded they would be instantly moved out the directory as soon as a "successful transfer" messaged was received for it in /var/log/xferlog. Any help will greatly be appreciated.

Are the ftp uploads being done as a get or as a put i.e., is the upload initiated by a process on this server or from another server?

A common approach for this task is to have your script poll the upload dir for new files. If found, it will then poll every X seconds the file size of each file to see if it's growing. The upload is compete once the size stops growing, but that doesn't mean that it was successful. This is the point where you parse /var/log/xferlog to find that answer and then move or delete the file based on that status.

Do you have a test script that you're developing? If so, you should post it and provide detailed info on how it failing to accomplish the task and include any/all errors and warnings it produces.