Hello
I use the following script to extract information from MikroTik. Unfortunately, after his performance did not get any feedback on my screen.
#!/usr/bin/perl
use Net::SSH::Expect;
$ssh = Net::SSH::Expect->new (
host => "xx.xx.xx.xx",
port => "22",
password => 'pass',
user => 'admin',
raw_pty => 0
);
$ssh->login() or die ("Dont work");
($out) = $ssh->send('/queue simple print\r');
($out =~ /(\d+)/) && (($out) = ($1));
print $out;