Unbeliveable.... How simple was that. Thanks very much!
So you have discovered one of the unwritten rules, if at first you don't succeed, it is likely because you didn't spend enough time at CPAN yet!
Update: this should be a reply to VSarkiss and his/her recommendation to use Net::Telnet
In fact, I use it, to connect to some low level hardware via telnet, and without any problem, just works.
The disconnecting problem could be solved by keeping alive the connection. Some people, set an inactivity timeout, when reached, disconnects the client.
fmerges at irc.freenode.net