G'day sarf13,

This seems to be a very general request. I've provided some links below. Please read through them then post more specific questions indicating exactly what you don't understand or what code you're having difficulties with: the guidelines in "How do I post a question effectively?" should help you achieve this.

"Help me out to understand the socket programming.For passing data from one machine to another machine over TCP/IP protocol. What all basic things i have to take care for creating socket script??"

Take a look at "perlipc - Perl interprocess communication". In particular:

"Do I have to always run below server script on server end??"

I don't understand what you're asking with this one. Is it about the specific code you've posted or where you'd run that code? Perhaps after reading the above links you can rephrase this indicating what you're actually attempting to do and why.

"Is there any way to run server script remotely??"

You can run Perl scripts remotely. A good place to start might be Net::OpenSSH. This also provides information about other modules, with similar functionality, that may be more suited to your needs. Again, a description of what you're specifically trying to achieve and why would be helpful in providing a better answer.

"Is there any way to pass data across the machine running both server and client script at one machine only??"

You can run a server and one or more clients on the same machine and pass data between them. As before, more details about what you're having problems with understanding or coding would be useful.

-- Ken


In reply to Re: Perl Socket programming problem by kcott
in thread Perl Socket programming problem by sarf13

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.