<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;
In reply to data dump and sort by perldumbfounded12
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |