#!/usr/bin/perl

use Net::Telnet;

$t = new Net::Telnet(Timeout => 10, Prompt => '/cbos>/');
$t->open("Your.IP.Address.Here");
print $t->cmd("YourPasswordHere");

foreach $cmd ("show int eth0", "show int wan0", "show int wan0-0",
	      "stat eth0", "stat wan0", "stat wan0-0") {
    @l = $t->cmd($cmd);
    grep(s/^/$cmd:/, @l);
    grep(s/\r//g, @l);
    print @l;
}
undef $t;

exit 0;
