From: <ex...@ih...> - 2002-07-24 06:12:16
|
On Tue, 23 Jul 2002 17:01:51 +0100 (BST) Stephen <S.J...@du...> wrote: > 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? Yes, I understood that idiom to be acceptable too, although as someone pointed out the quotes may introduce problems. > > 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." ----------------------- > > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Expectperl-discuss mailing list > Exp...@li... > https://lists.sourceforge.net/lists/listinfo/expectperl-discuss > |