my $host = "172.16.0.2"; my $session = Net::Telnet::Cisco->new( Host => $host, Prompt => '/\(Cisco Controller\)/', Errmode => 'return', Timeout => 5); $session->open($host); # Wait for the username prompt and enter username $session->waitfor('/^User:.*$/'); $session->print($username); # Wait for the password prompt and enter password $session->waitfor('/^Password:.*$/'); $session->print($password); $session->cmd("config paging disable"); #Inside subroutine my @output; my $input_log = $directory . "/" . $host . "_get_ap_summary_in.log"; my $output_log = $directory . "/" . $host . "_get_ap_summary_out.log"; $session->input_log($output_log); $session->output_log($input_log); @output = $session->cmd("show ap summary");