From: Blackstone, J. D. <jda...@ci...> - 2002-12-06 22:08:09
|
Looking through some old source code (wow; when did it get to the point that I had "old" code written with Expect.pm?), I discovered some routines where I had written things like: $x->expect("String"); $x->send("a\r"); $x->expect("String2"); Apparently I got confused and was thinking of TCL/Expect's expect command, which does not take the timeout as a parameter. Strangely, this code seems to work. Is the expect() method designed to work like this, or am I just getting lucky by cramming the right things into the buffer in the right order and not running into race conditions? I'll probably digging through the source code to answer this unless someone knows off the top of their head. If this is a feature, not dumb luck, it could go into the docs somewhere. (And if it's in the docs, I'll accept a cluestick to my skull.) Thanks. jdb |