print "It was $_ that I saw in some stooge-like file!\n";
}
输出到标准输出
print
操作符会读取它后面的参数列表中的所有元素,并把每一项(当然是一个字符
串)依次送到标准输出。它在每项之前、之后与之间都不会再加上额外的字符。要是
想在每项之间加上空格并在结尾加上换行符,你得这么做:
$name = "Larry Wall";
print "Hello there, $name, did you ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month, and much more.