例えば5秒おきに特定のファイルを削除するコードをPerlで書くとこんな感じ

while(true){
  unlink('C:\Document\Sample File.txt');
  sleep(5);
}