@a=qw(ok now what is hi the matter);
$array=shift; # this is a reference of an array$#$array) { # I saw some say to avoid last element to get size #if ($array->[$i] =~ /hi/) { del
例如,该函数将接受两个参数: function parsePattern(pattern, string) {} 可接受的模式可以是'(hello|hi),%i,(how are you|很高兴见到你)‘,如果第二个参数以这种方式设置为'John’ parsePattern('(hello|hi), %i, (how are you|nice to see you)', 'John') 我希望输出包含所有可能的组合: 'hello, John, how are you&