From: Sorrell, A. <Al_...@tr...> - 2002-03-05 16:06:28
|
Thanks! That's what I needed. Working great now. Al -----Original Message----- From: RGi...@a1... [mailto:RGi...@a1...] Sent: Tuesday, March 05, 2002 6:10 AM To: Sorrell, Al Cc: 'exp...@li...' Subject: Re: RE: [Expectperl-discuss] does timeout => sub{} pass filehandle? > I'm still having a problem trying to "send" from inside a timeout > condition: Oh, sorry for that mistake: as the timeout is shared among all matches (which could be on different spawned programs), its callback doesn't get an expect object, you have to use one from the outer context, i.e. my $exp = new Expect; $exp->raw_pty(1); $exp->spawn(...); $exp->expect($timeout, ... [ timeout => sub { $exp->send() }]); Hope this helps, Roland -- RGi...@cp... |