in reply to Win32::Daemon help

A daemon makes no sense. daemon's (in Windows lingo, a service) does not read STDIN or write STDOUT - it has no means of doing so. A daemon is a process that is running without a console - other programs communicate with it by other means.

It appears that you are desiring to periodically delete the data in some kind of log file. At most you would need to just use the process scheduler in Windows. But I doubt you even need that.

Find whatever is creating this "abc786" file and have it write to the file "NUL" instead. This will look like a normal file which can be opened and written to, but the contents are just discarded (never written to disk in the first place). Data just disappears, no Perl script, no problem.