http://www.perlmonks.org?node_id=314712

xenchu has asked for the wisdom of the Perl Monks concerning the following question:

While drifting around the Monastery I read some mention of the Config module. Since I had not looked at it before I decided to check it out. To cut to the chase I found a sample program in the module and decided to run it. I copied it to gedit, saved it and ran it as follows:

perl -c configure.pl (My name for the program, of course.)

I got the following response:

Unrecognized character \xE2 at configure.pl line 12.

Of course I looked at the program again and saw no srange characters. I have left out the shebang line and a comment line at the top of the program. Here is the program:

use Config; use strict; my %sig_num; my @sig_name; unless($Config{sig_name} && $Config{sig_num}) { die "No sigs?"; } else { my @names = split \’ \’, $Config{sig_name}; @sig_num{@names} = split \’ \’, $Config{sig_num}; foreach (@names) { $sig_name[$sig_num{$_}] \|\|= $_; } } + print "signal #17 = $sig_name[17]\n"; if ($sig_num{ALRM}) { print "SIGALRM is $sig_num{ALRM}\n"; }

Sorry, this software program seems unable to print single quotes and pipes properly. My question then, is how do I locate this mysterious character? I realize that I could probably just delete the line and re-type it, but I would rather fix the problem. Besides, next time it might be something serious.

Thanks,

xenchu

Update: Thanks pg, let me give that a try...whoa! that compiles! That's great! How did you find out what the strange characters were? I am using 5.8.0 btw.

Update2:Thanks, ysth. Another valuable lesson learned.


The Needs of the World and my Talents run parallel to infinity.