From: <ex...@ih...> - 2002-07-24 06:08:24
|
On Tue, 23 Jul 2002 23:00:07 -0700 Austin Schutz <te...@of...> wrote: > 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 Actually I think I did at one point try $obj->expect(undef, '-re', $item); $item could be like: [yes] or [no] or [/home/efudd] etc., etc. > certainly possible to make illegal regexps that will have unexpected > behaviors. Also putting in double quotes may end up in an extra unexpected > interpolation. Perhaps that's the issue then, an illegal regexp in the form: [somealphastring] the brackets in this case could well be the problem. I'll investigate as soon as I can. > > > > > 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 > |