in reply to Perl telnet remote server

Short answer is: try looking at Net::Telnet.
------------ :Wq Not an editor command: Wq