From: Austin S. <te...@of...> - 2002-03-01 11:11:06
|
On Fri, Mar 01, 2002 at 08:15:54AM +0100, Kilian A. Foth wrote: > our $pid = > Expect->spawn("/opt/pkg/tagger/bin/tagger", > "-v0", "-z$args{z}", "$args{l}", "-") > or die "Couldn't spawn, $!"; > > The tagger reads words such as: > > das > > and answers with tags such as: > > ARTDEF > > Since I don't know what it's going to answer, I have to expect > everything: > > my @comm = $pid->expect(1,'-re',"^.*"); > > But then the first expect call picks up "das", and the next gets > "ARTDEF". I thought $pid->expect() was supposed to read the child's > output, not its input. Am I mistaken? > By default a terminal will echo its input. You may need to turn echoing off via stty("raw") or "-echo". Austin |