in reply to Re^3: -s testing for empty file; works on local, but not on remotein thread -s testing for empty file; works on local, but not on remote
stat can fail for a number of reasons.
Add the following before the if (-s) line:
What's the output?
No recent polls found