From: <db...@CT...> - 2003-02-19 15:29:40
|
Thanks. I see the perldoc covered this point, but unfortunately this was not clear to me at time of posting! Thanks for the really nice work on this module. I've been an avid user of the Tcl version of Expect over the years. Up until now, I've not found a replacement for the original version's ability to manage multiple interactive processes using indirect spawn Id list. This is very powerful feature I feel, and so this is really fantastic. Thanks, David Basham db...@ct... Roland Giersig To: db...@CT... <RGiersig@cpa cc: exp...@li... n.org> Subject: Re: [Expectperl-discuss] how to reference matchlist() when matching on multiple spawn id's 02/19/2003 07:07 AM Sorry for the belated reply... > Albeit a simple example, is there a proper way with multiple > processes to reference ($object->matchlist)[0], since I'm not > sure which \@sessions spawn_id matched? The callback gets the Expect object that matched as first paramter, i.e. expect($timeout, '-i', \@sessions, [ "([^\r\n]+)[\r\n]+", sub { my $obj = shift; my $match = ($obj->matchlist)[0]; # print the match.. exp_continue; } ], ); Hope this helps, Roland -- RGi...@cp... |