in reply to Could you suggest improvements to my Cisco network device audit script?
Well, as for suggestions, use perltidy. Hopefully you see why.
Did you assemble this stuff from different sources?if (!defined $match) { print "$ip: ERROR_1\n"; print LOG "$ip: ERROR_1\n"; return; } ... if (!defined $match) { print "$ip: ERROR_13\n"; print LOG "$ip: ERROR_13\n"; return; } ... sub get_inventory { my ($ip, $t) = (@_); if (!$t->cmd('terminal length 0')) { print "$ip: Error changing terminal length\n"; print LOG "$ip: Error changing terminal length\n"; } my @show_run = $t->cmd('show run | inc hostname'); ...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Could you suggest improvements to my Cisco network device audit script?
by monkerz57 (Initiate) on Dec 23, 2014 at 00:57 UTC |