Re: Help required about NET::TELNET
- From: vmalik@xxxxxxxxxxxxxxxxxxxx
- Date: Mon, 05 Dec 2005 10:19:04 -0500
Hey Mazhar,
I don't know much about perl, but in the $telnet->waitfor method, what does the
weird parameter mean ('/login: $/i')? I thought that $ means a scalar variable
in perl. What do the forward slashes do here? Some sort of regular expression??
Vishal
Quoting Mazhar <syedmazhar.hasan@xxxxxxxxx>:
> Hi Folks,
> I have installed the module NET::TELNET from CPAN and when i try to
> execute the below simple pgm,
>
> --------------------****************************-----------------------
> use Net::Telnet;
> $telnet = new Net::Telnet ( Timeout=>100,Errmode=>'die');
> $telnet->open('202.177.129.37');
> $telnet->waitfor('/login: $/i');
> $telnet->print('root');
> $telnet->waitfor('/password: $/i');
> $telnet->print('slr@#37');
> print $telnet->cmd('who');
>
> ------------------------------------------------------------------------------
> The Output of the above program is
> pattern match read eof at prog.pl line 12
>
>
> Please help me out folks as where may be the problem
>
> Regards
> Mazhar
>
----------------------------------------
This mail sent through www.mywaterloo.ca
.
- Follow-Ups:
- Re: Help required about NET::TELNET
- From: Stephen Kratzer
- Re: Help required about NET::TELNET
- References:
- Help required about NET::TELNET
- From: Mazhar
- Help required about NET::TELNET
- Prev by Date: Re: A Strange Syntax
- Next by Date: Re: Help required about NET::TELNET
- Previous by thread: Help required about NET::TELNET
- Next by thread: Re: Help required about NET::TELNET
- Index(es):
Relevant Pages
|