I'm trying to use the Net::Telnet module in Perl. One of the methods is waitfor(). I'm totally new to perl and can't figure out the syntax for the pattern. The prompt on the screen that is what I guess the method is waiting for is 'C:\Documents and Settings\tester>' My question has two parts - 1) is the method waiting for the prompt, or something else? 2) If it's waiting on the prompt, what is the syntax to match that string?
Here's the sample program I'm working with and modifying. The third waitfor line is the problem.
$telnet = new Net::Telnet ( Timeout=>10, Errmode=>'die'); $telnet->open('camel.perlfect.com');
$output = $telnet->waitfor('/\$ $/i');