in reply to check for latest file, remove and touch file?

As an aside to the other comments, this line in your example code (the "shebang" line):


should read:


Note the exclamation mark after the hash mark, and the forward-slash mark is removed. That assumes your perl executable (or a link to it) is actually '/bin/perl'.