#!/usr/bin/perl
use strict;
use warnings;
use Net::Telnet;
my @lines;
my $t = new Net::Telnet(
Timeout=>10, Prompt=>'/# $/',
Dump_Log=>'NetTelnet_x.log'
);
$t->open("192.168.4.190");
$t->login("foo", undef);
@lines = $t->cmd("ls");
print @lines;
####
timed-out waiting for password prompt at ./NetTelnet_x.pl line 13
####
$t->cmd("foo");