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

In reply to Re^2: Net::Telnet timed out when logging in by poolboi
in thread Net::Telnet timed out when logging in by poolboi

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.