Perlについての質問箱 32箱目
■ このスレッドは過去ログ倉庫に格納されています
0789デフォルトの名無しさん
2007/09/27(木) 00:01:15例があるじゃん。マニュアル嫁。
# then do some pattern matching with either the simple interface
$patidx = $exp->expect($timeout, @match_patterns);
# or multi-match on several spawned commands with callbacks,
# just like the Tcl version
$exp->expect($timeout,
[ qr/regex1/ => sub { my $exp = shift;
$exp->send("response\n");
exp_continue; } ],
[ "regexp2" , \&callback, @cbparms ],
);
■ このスレッドは過去ログ倉庫に格納されています