The question wasn't about sockets. It was about Net::Telnet objects, which hide most of the socket details and let you use methods like getline and print on the object.
I think the most important questions here are whether the protocol is really Telnet (especially on port 22, which should normally be ssh instead), whether the code is supposed to implement the server or the client end, whether it's an authenticated session like Telnet normally would be (but isn't always), and where the login handling is done if it is an authenticated session.
|