in reply to Re: Net::Telnet timed out when logging in
in thread Net::Telnet timed out when logging in

hi guys, alright i've managed to use glide's code to work apparently when i use login(), i can't can't to let it work 'cos of i need a prompt which i dunno what it is for windows XP below is my latest code:
#!/perl/bin/perl use strict; use Net::Telnet(); my $telnet; $telnet = new Net::Telnet ( Timeout=>10, Errmode=> 'return'); $telnet->open('ip_address')or die "failed to connect:$!"; $telnet->waitfor( -match => qr{ogin} ); $telnet->print("username"); $telnet->waitfor( -match => qr{assword} ); $telnet->print("password"); $telnet->input_log("C:\\log.txt"); $telnet->dump_log("c:\\dump.txt"); print("login successful");
apparantly no errors is out and it prints login successful.
but the dump_log and input_log doesn't seem to contain any information so i'm not too sure if connection to telnet is made yet.
about what i'm doing i need to connect to SQL database with another proprietary database.
and this proprietary database is in a switch which i need to telnet into.
it's all sorta like a automation thing that i need to help my colleges do for easy documentation.
so now i need to try the first step and that's to establish a connection with telnet..
so how do i know if it's working? hope my code is correct..pls help? thanks