in reply to Barewords and equality tests

SERVICE_STOPPED and the others are constants, defined and exported by Win32::Daemon. Not barewords, but functions each returning a constant, numerical value.

Just try the code snippet:

use Win32::Daemon; print SERVICE_STOPPED;

Because SERVICE_STOPPED is a function exported by Win32::Daemon, Perl will not think of it as a file handle, but instead print its value: 1.