Why not use Net::Telnet?
In reply to Re: Getting a response from a socket by VinsWorldcom in thread Getting a response from a socket by cspctec