перлом. что-то типа:
Код
#!/usr/bin/perl -w
use Net::Telnet ();
print "start...\n";
$t = new Net::Telnet (Timeout => 30, Prompt => '/>$/');
open(f_c, "<./config.txt") || die "Файл не найден!";
$line = <f_c>;
$t->open($line);
$t->print();
print ($t->login("admin","123456"));
while($line = <f_c>)
{
@lines = $t->cmd($line);
print @lines;
sleep (1);
}
close(f_c);
$t->close;
print "end.\n";
проверки доворачиваются по вкусу.