From: Heidi Ng <ng_...@ya...> - 2002-07-31 20:12:09
|
Hi, I am trying to write a script program which spawns and uses multiple Expect session. I tried using the '-i' option with the Expect object's PID but it gave me the following error message. I got the pid by using $pid = $session->pid() and this returned an integer '1088; to me. Can someone please help me? Thanx! Heidi Can't use string ("1088") as a symbol ref while "strict refs" in use at /usr/lib /perl5/5.6.1/Expect.pm line 564. sub expMatch { my ($session, $pid, $send_arg, $expect_arg) = @_; print $session "$send_arg\r" $temp = $session->expect( $timeout, '-i', [$pid], ['-re', $expect_arg], ['timeout', sub {print "TIMEOUT expecting $expect_arg\n"}] ); } --------------------------------- Do You Yahoo!? Yahoo! Health - Feel better, live better |