首页 > 试题广场 >

在perl中,求下面代码打印的信息: $_ = “Hello

[单选题]
在perl中,求下面代码打印的信息:
$_ = “Hello there, neighbor”;
if(/(\S+) (\S+), (\S+)/){
print “words were $1 $2 $3”;
}
  • words were Hello there neighbor
  • words were Hello
  • words were  $1 $2 $3
  • 运行出错

这道题你会答吗?花几分钟告诉大家答案吧!