perlquestion
perldumbfounded12
having an issue with sorting and dumping files out of a router. Here is what i got..looking to sort interfaces that are DOWN/UP.
<code>
#! /usr/bin/env/ perl -w
use strict;
use warnings;
use Net::Telnet::Cisco;
{
use Data::Dumper;
print( Dumper);
}
my $ip_address ="";
my $username = "";
my $password = "";
my $prompt = '/.*[#\$%>]\s*$/';
my $session = Net::Telnet::Cisco->new(Host => $ip_address, Prompt => $prompt, Timeout =>20);
$session->login($username, $password);
# Execute a Command
my @show_log_output = $session->cmd('show log');
my $mystring;
$mystring = "up";
$mystring = "down";
print "$mystring";
print "@show_log_output\n";
#Execute a Command
my @show_interface_desc_output = $session->cmd('show interface desc');
print "@show_interface_desc_output\n";
$session->close;
exit;
</code>
<code>