Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Net:telnet Prompt

Status
Not open for further replies.

dod123

Programmer
Dec 13, 2004
20
IL
Hello all;

I am using the Net:Telnet modul from CPAN.
The prompt i recieve is #.
I tried to match the prompt like this:'/\# $/'
With no succsess.


use Net::Telnet ();
$t = new Net::Telnet (Timeout => 10,
Prompt => '/\# $/');

$t->open("sparky");
$t->login($username, $passwd);
@lines = $t->cmd("who");
print @lines;



Thanks for help.
 
The matching work well as is.
I add another problem.

Thanks.
 
I'm not sure why you're using /\# $/ instead of just /# $/

And.... from your second post - if the matching is working well, what is your other problem?

Mike

To err is human,
but to really foul things up -
you require a man Mike.

Want to get great answers to your Tek-Tips questions? Have a look at faq219-2884

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top