From: Roland G. <RGi...@cp...> - 2002-08-04 10:08:24
|
> I double checked my script and tried using the expcet object. The > following are 2 cases I tried. The first one is one without '-i'. > When using this method, everything works fine. I turned on > exp_internal and saw that expect actually sent and got a match. > However, when I used the 2nd method with the '-i', the match field is > blank. ($expect_arg: OK, $timeout: 120) > > 1) $temp = $session->expect( $timeout, ['-re', $expect_arg], > ['timeout', sub {print "TIMEOUT > expecting $expect_arg\n"}]); > > > 2) $temp = $session->expect( $timeout, > '-i', [$session], > ['-re', > $expect_arg], > ['timeout', sub {print > "TIMEOUT expecting $expect_arg\n"}] > ); Try 2) as $temp = expect($timeout, '-i', ...) without the object tagged onto the front. Should work then... Also, set $Expect::Debug = 1 to get further internal information on how Expect handles your call... Hope this helps, Roland -- RGi...@cp... |