From: Austin S. <te...@of...> - 2002-07-24 06:00:50
|
On Tue, Jul 23, 2002 at 08:14:35AM -0700, ex...@ih... wrote: > Don't think we're on the same wavelength, I suspect that it's my fault for > not providing enough info. I do understand "-re", I do not understand why > "-re" fails and when I don't specify "-re" things are fine. > > In my previous post I noted that I was seeing this which > I only saw when I used $obj->expect(undef, -re => "$item"); > and this showed up > Use of uninitialized value in concatenation (.) or string at /usr/btools/perl/lib/site_perl/5.6.1/Expect.pm line 1388 > > > If I use this I have no problems: > $obj->expect(undef, $item); > > > So what's different about the code path for those two that causes one to fail? Dunno, what's $item? Also, why the double quotes in "$item"? It's certainly possible to make illegal regexps that will have unexpected behaviors. Also putting in double quotes may end up in an extra unexpected interpolation. > > Essentially that's all the code there is, it waits for a string which is a "key" > value and provides the corresponding "value" value. It almost appears as if the > -re idiom is not respecting the undef for the timeout value and therefore is > not waiting indefinitely. > That would definitely not be proper behavior. Austin |