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

Please help, oh wise Perl Monks.

I have this one program that sends information to the server via TCP/IP (this is a Windows-based executable program). I tell it the IP number or the URL, and it then sends the information. This program can work with other programs of its' kind, using IP numbers as well. But I need to make a PERL program that will take the information from that program and sending it to other programs, i.e. making a server program of sorts. So I am thinking of using IO::Socket::INET to handle the data. All I need to do is make it listen for the information. But I don't know if the program has to be running for this to work.

Could any of you guys help out? The server that I am using, BTW, is Linux based.

Replies are listed 'Best First'.
Re: Sending Information via TCP/IP
by Zaxo (Archbishop) on Feb 18, 2003 at 03:53 UTC

    LWP::UserAgent will give you a higher level starting point for collecting the data. You'll need to be more specific about the services you want to provide to get advice about the server.

    Yes, the program will need to be running ;-)

    After Compline,
    Zaxo

      Yes, the program will need to be running ;-)

      Not exactly true, the server could be started using tcpwrapper and inetd,
      TIMTOWTDI, not only in programming perl :-p

      regards,
      tomte


Re: Sending Information via TCP/IP
by castaway (Parson) on Feb 18, 2003 at 10:54 UTC
    If I correctly understand it, then you want to make a server program which can be contacted by your existing program, collects the data, and then sends it to other clients?
    In that case you can use IO::Socket::INET to write the server. Your other program doesn't have to be running all the time in order for this to work, but it does need to send the data to the server.

    Unless they're on the same machine of course, and you can get the data some other way.. (local files?)

    C.