"Unrecognized character \xE2" in a Hello World program

13,022

Change the

“”
character in the print statement to
"
Example

print "Hello world";  
Share:
13,022
nishanth chava
Author by

nishanth chava

Updated on July 22, 2022

Comments

  • nishanth chava
    nishanth chava almost 2 years

    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”;