in reply to perl+telnet(with out Net::Telnet)

Why aren't you allowed to use CPAN modules? See Yes, even you can use CPAN. Also please note that telnet isn't secure.