in reply to Perl Socket programming problem

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