in reply to Re: telnet from a cisco telnet
in thread telnet from a cisco telnet

This node falls below the community's minimum standard of quality and will not be displayed.

Replies are listed 'Best First'.
Re^3: telnet from a cisco telnet
by Perlbotics (Archbishop) on Aug 09, 2011 at 09:21 UTC

    Certainly not. This is not a code writing service. In Re^3: telnet from a cisco telnet you have shown the output. Now, try to fix it step by step (e.g. use my). You can add use warnings; and use diagnostics; for better explanations of the error messages and warnings you get.
    Come back with a fixed version of your code if you still have problems. But please, show some own effort first. Thanks.

      finally it worked without errors but i got this output "command timed-out at C:\Users\Kumar\telnet.pl line 7" where did i go wrong?

      use strict; use Net::Cisco; use Net::Telnet(); my $t =Net::Telnet::Cisco->new(Host=>'10.0.0.1'); my @output=0; $t->login('9190','KUM@R425'); $t->cmd("telnet 192.168.203.23"); $t->waitfor('/:$/i'); $t->cmd("public"); $t->waitfor('/>$/i'); @output=$t->cmd("show system"); open(CONFIG,">config.txt"); print CONFIG "@output\n"; close(CONFIG); $t->close;
        i know that the problem is at line 7
        $t->cmd("telnet 192.168.203.23");
        is that above statement is a right way to telnet from this?