From: Roland G. <RGi...@cp...> - 2003-02-19 12:07:58
|
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... |