perl script to check if empty files are created and delete them and run a shell script

I have a local linux machine in which the files are dumped by a remote ubuntu server. If the process in remote server has any problem then empty files are created in local machine. Is there any way using perl script to check if the empty files are being created and delete them and then run a shell script to kill and start the process in remote server?

You don't need Perl to do that. Few simple commands will do:

find /path/to/files -type f -empy -exec rm '{}' \; -exec touch ./tmp.$$ \;; if [ -e ./tmp.$$ ]; then /path/to/restarting_script; rm ./tmp.$$; fi

Thanks bartus11
Can you show how this can be written in script as I'm new to scripting.