“Unrecognized character \xE2” in a Hello World program

情到浓时终转凉″ 提交于 2019-12-10 11:08:05

问题


I am trying to write my first perl "hello world" program on Mac OS X Yosemite and it shows this error when I try to run this using terminal:

Unrecognized character \xE2; marked by <-- HERE after
print <-- HERE
near   column 7 at test.pl line 4.

I couldn't figure out what was wrong in this program. Please help me out here.

Code:

#!/usr/bin/perl
use strict;
use warnings;
print “Hello world”;

回答1:


Change the

“”
character in the print statement to
"
Example
print "Hello world";  


来源:https://stackoverflow.com/questions/29881571/unrecognized-character-xe2-in-a-hello-world-program

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!