in reply to Re^2: How to make Wake Win32 work?
in thread How to make Wake Win32 work?

...usually executed by perl through a Windows Explorer file association.

I don't know the truth value of that statement, but "usually" is pretty broad-brush and unless I'm being even denser than usual, I don't see anything in OP's statement of the problem to support or rebut the notion that the script is being invoked via an association.

I also have a notion (but not the time right now to check my recall) that "the shebang is ignored altogether" is also subject to some qualifications or exceptions. <- yep, I may be wrong, but will try to recheck this later. In the meantime, let us hope that wiser ones will confirm or rebut?