首页 > 试题广场 >

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

[单选题]
在perl中,求下面代码打印的信息:
$_ = “Hello there, neighbor”;
if(/\s(\w+),/){ 
print “the word was $1\n”; 
}
  • the word was there
  • the word was Hello
  • the word was $1
  • the word was Hello there, neighbor

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