in reply to How to make Wake Win32 work?

I am looking at your code, and I see that something seems odd with your shebang line:
#!perl -c

According to the perl docs, putting -c tells it to check the syntax only, and not to actually run the code. I'm not sure if that line is used when you are using perl under Win32, but that definitely is something I'd check.

Replies are listed 'Best First'.
Re^2: How to make Wake Win32 work?
by EvanK (Chaplain) on Oct 24, 2006 at 17:08 UTC
    the shebang line is actually a *nix characteristic (since perl is native to *nix), and in a native windows perl implementation (activeperl for instance), i think the shebang is ignored altogether, as the file is usually executed by perl through a Windows Explorer file association.

    __________
    Build a man a fire, and he'll be warm for a day. Set a man on fire, and he'll be warm for the rest of his life.
    - Terry Pratchett

      in a native windows perl implementation (activeperl for instance), i think the shebang is ignored altogether,

      Not so.

      C:\test>perl #! perl -c $x = 1; ^Z - syntax OK

      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
      "Science is about questioning the status quo. Questioning authority".
      In the absence of evidence, opinion is indistinguishable from prejudice.
        yes, but you're coding directly into the perl interpeter. i mean if you execute a prewritten .pl file thats associated with the perl compiler.

        __________
        Build a man a fire, and he'll be warm for a day. Set a man on fire, and he'll be warm for the rest of his life.
        - Terry Pratchett

      ...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?