Ok so I have been able to get this to work* - somewhat.

* - Not literal because its not how i envisioned it.

Here is what I got, I created an input.log to well capture the input in a log so that I can see in better detail as to what is going on. It turns out the log file produces the output I was looking for the perl script to output.

Here is what the current code looks like:
#!/usr/bin/perl no strict; #### Define Library Locations #### #use lib '/root/Net-Telnet-3.03/blib/lib/Net/'; use lib '/root/Net-Telnet-Cisco-1.10/blib/lib/'; #### Define Modules to use #### #use Net::Telnet; use Net::Telnet::Cisco; #### Create New Telnet Connection #### my $telnet = Net::Telnet::Cisco->new(Host=>'1.2.3.4', Port=>2005, Inpu +t_log => "input.log", Timeout=>5, Errmode=>'die'); $telnet->waitfor('/Username:/') or die('FAILED'); $telnet->print('XXX'); $telnet->waitfor('/Password:/') or die('FAILED'); $telnet->print('XXX'); $telnet->cmd("show ver");

Here is the output of input.log:

User Access Verification

Username: XXX
Password:


^MDIAG> show ver
^M BLAH BLAH BLAH VERSION NUMBER BLAH
^MDIAG>

Now my question is deeper, why is this not outputing via the print @output; statement, it seems like @output isnt even being pushed the output of "..cmd(show ver)"?

My second question is why do i continue to get a command-timed out line ## - in reference to the cmd(show ver); line, even though the output.log shows it executed correctly? Is there a way to kill the cmd() before my 2 second timeout?

Also does the ^M have anything to do with either question?

Thanks for the help,

In reply to Re^2: Telneting to a 2511 Access Server Device on line 2005 by llod45
in thread Telneting to a 2511 Access Server Device on line 2005 by llod45

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.