From: Stephen <S.J...@du...> - 2002-07-23 16:07:45
|
It seems to me that the only problem here is that you are using the key, value pair system like a hash. When i want to do a regexp match i always do something like: $obj->expect(undef,'-re',$item); this works for me. I'm not sure it's intended to work with the => is it? Stephen >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? > >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. -------- "They sought it with thimbles, they sought it with care; -------- They pursued it with forks and hope; They threatened its life with a railway-share; ----------- They charmed it with smiles and soap." ----------------------- |