#!/usr/bin/perl use Net::Appliance::Session; use strict; my $host = "10.0.0.1"; my $s = Net::Appliance::Session->new({ personality => 'ios', transport => 'SSH', host => "10.0.0.1" }); $s->set_global_log_at('debug'); eval { $s->connect(); my @TempArr = $s->cmd('sh run'); my $TempArr_ref = \@TempFile; push ( @{ $TempArr_ref }, $s->cmd('sh tech')); push ( @{ $TempArr_ref }, $s->cmd('sh ip accounting')); print "@{ $TempArr_ref }\n"; }; if ($@) { warn "failed to execute command: $@"; } $s->close;