in reply to Syntax error in scritp or so?
As long as you don't check the result of open(), the most likely explanation is that it fails and therefore does not produce a file handle valid for reading.
Try adding or die "Open failed '$mailcheck': $!" immediately after open(HANDLE, $mailcheck) and you'll most likely see the root cause of the problem.
Umm.... a quick update: I just noticed the close() statement inside the read loop. Probably not the best place for it.
Time flies when you don't know what you're doing
|
|---|