On Fri, 23 Jan 2004 13:24:24 -0000
"Singh, Ajit p" <[EMAIL PROTECTED]> wrote:
> Thanks Owen for your reply.
>
> that was a typo, however i m getting the below error message now..
>
> $t = new Net::Telnet (Timeout => 10,
> Input_log => $inlogfileg,
> Output_log => $outlogfile,
> Telnetmode => 1,
> dump_log => $dmplog,
> Timeout => $secs,
> Prompt => 'W9-BAS-01');
> # Prompt => '/bash\$ $/');
> $t->open("hostname");
>
> Error message:
> ignoring bad Prompt argument "W9-BAS-01": missing opening delimiter of match
> operator at Bastelnet.pl line 12
Please don't reply to me personally, reply to the list.
Try something like this
my $t = Net::Telnet->new(Host=>"hostname",
Timeout=>$secs;
Dump_log=>$dump_log); # assign $dump_log
$t->waitfor('/W9-BAS-01/') || die "bad $1";
$t->print ("$whatever");
Read perdoc Net::Telnet
Read the dumplog, it often contains clues as to what is happening
--
Owen
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>