Seshouan has asked for the wisdom of the Perl Monks concerning the following question:

has anyone experienced with communicating between a windows application and a perl script? I have a perl server runing, and a perl client that is connected to it, I have a windows app that launches the client, what I need is a way to get the windows app to let the perl client know that it needs to alert the server that it is quitting.

Or is there a way for another perl script to be invoqued that will send some info to the client (which is still connected to the server) to let it know that it should let the server know that it is quitting? THanks
  • Comment on communicating with a perl script from a windows App

Replies are listed 'Best First'.
Re: communicating with a perl script from a windows App
by lmarecha (Acolyte) on Sep 27, 2001 at 01:42 UTC
    One of the solution will be to use a socket communication. Open a socket on the server and wait for an incoming connection. When a client start it connect to the socket and can advertise/send information to the server. There is a good example of socket communication in "Learning Perl".
      That'd be the deprecated editions of Learning Perl. We didn't carry that forward in the new one, since most people who are just learning Perl aren't going to be writing low-level socket calls. {grin}

      -- Randal L. Schwartz, Perl hacker

        Well I must admit it's an old one from 1997... I should update it soon, but the french version is always late for the new one...
Re: communicating with a perl script from a windows App
by Starky (Chaplain) on Sep 27, 2001 at 04:01 UTC
    Check out PerlCtrl from ActiveState. I haven't used it, so what follows is from what I understand of it. I would suggest you do some research before you take my word for it ;-)

    Since it sounds like the windows app and perl client are on the same machine, you can compile the perl client into a ddl, then manage the client from the windows app.

    Hope this helps!