in reply to Object Oriented Perl interface to read from and write to a socket

If you are asking for guidance here, my first suggestion to you would be this:   that your true purpose here is, not “to create a Perl object that talks to a socket,” but rather “to create a Perl object that will serve as a black-box interface to a remote system.”

Of course, a search of CPAN (http://search.cpan.org) instantly points us to modules such as IO::Socket – this merely being among the first of 1,291 hits for the word, “socket.”   (Footnote:   A search for “ISO-8859-1” yields 248 more!)   Your Perl object can, and undoubtedly will, use such a package in its implementation.   But the purpose of this class (or, as the case may be, classes) will be, not only to handle the low-level mechanics of the basic protocol, but to intelligently and conveniently handle the messages, as well.

Ideally, no client of your module would have to care about where the server is (except for its IP-address and maybe port), nor exactly how it talks to you, nor exactly what it says.   The module becomes the perfect interpreter ambassador... excellent at what it does, so that nobody else has to.

(And if, at the conclusion of your due-diligence search of CPAN, it so happens that you have just invented a new CPAN module, please consider contributing it.)