in reply to Client-Server Communication

Sounds like you could just use ssh for this. In fact, you might not have to write any perl at all.