perldoc and utf8 or something..

Harry Putnam reader at newsguy.com
Sat Aug 14 15:21:32 UTC 2004


My setup:
*--
Software:
Not fully updated
Linux kernel 2.6.7-1.494 Architecture i686
Fedora Core release 2.90 (FC3 Test 1)
Hardware:
model name	: Intel(R) Pentium(R) 4 CPU 2.00GHz
cpu MHz		: 1994.797
*--

[PERL beginners group alert: Crossposted from Fedora-test list]

Group,
Something I've been noticing for a while now.  I keep forgetting to
ask about it since it only comes up if I copy/paste something from the
output of perldoc.

Here is an example of what I see:
perldoc -f split

Now from that output, find the first example of actual scripting
(scroll down to find it) 
  print join(’:’, split(/ */, ’hi there’));

copy/paste that into a perl script:
cat hithere.pl
#!/usr/local/bin/perl -w
 print join(’:’, split(/ */, ’hi there’));


And run it ./hithere.pl:
Unrecognized character \xE2 at ./hithere.pl line 2.

What is causing this are the single quote chars in the copied line.
Fix it by replacing them with ones produced by your keyboard.

Anyone know why this happens?





More information about the fedora-test-list mailing list