From: Roland G. <r.g...@xs...> - 2001-03-21 10:49:17
|
[I'm CCing this to the discussion list to generate some traffic there :-)] Dennis Hammer wrote: > I've got a problem with Expect.pm: > > $router->expect(2, ['Password:', sub {$router->send('password\r'); }]); > > the above line seems to match as the password string is sent, but > seemingly the string is only printed to the tty without sending it to > the application referenced by $router. Output looks like this: > > User Access Verification > > Password: password\r > > which is not quite the thing I wanted to achieve. > > Please tell me what the problem is. Make this '$router->send("password\r")' and it will work. q'' doesn't interpret '\r', so you are missing the end-of-line here. Don't be ashamed, it happens to the best of us... :-) Roland -- RGi...@cp... |