print

print

print "The aswer is ",5*7,"\n";
$foo = "The aswer is ".5*7."\n";
print $foo;

刚看perl. 运行的时候老提示第2个有错误.

String found where operator expected at test line 5, near "7."\n""
        (Missing operator before "\n"?)

why???
把5*7用引号引起来吧,可能原因是.号在前,优先于*号
. 连接字符串,也可能是浮点数中的.号。
如果7和.之间加个空格就对了,或者5*7加括号

谢谢楼上的解答.
Suggest you to read "Perl Best Practices". It is really a good book, well-written and very practical.