in reply to Re: Trying to understand the warning.
in thread Ignore this! Will repost later.

So you should first check that the file named in $file exists:

"Check first" is a bad meme, because it might suffer from race conditions.

That's why I'd stat once, and then check if the return value is a null list.

  • Comment on Re^2: Trying to understand the warning.