Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"Unrecognized character \xE2" in a Hello World program

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”;
like image 684
nishanth chava Avatar asked Jan 08 '23 12:01

nishanth chava


1 Answers

Change the

“”
character in the print statement to
"
Example
print "Hello world";  
like image 113
keety Avatar answered Jan 14 '23 13:01

keety