AppleFritter has asked for the wisdom of the Perl Monks concerning the following question:
Oh monks most tawny and tangy, whose wisdom and knowledge of all things Perl is unalienable and indefeasible, help me out, for I'm very much missing the obvious.
As you will well know, Perl allows Unicode characters in variable names, so long as use utf8; is in effect. So the following snippet works as expected (apologies for the unresolved HTML entities, Perlmonks itself does not handle Unicode properly):
my $人 = "World"; say "Hello, $人";
However, the following does not:
my $F310; = "World"; say "Hello, $F310;";
Perl 5.20.0 complains about this, saying:
Unrecognized character \x{1f310}; marked by <-- HERE after my $<-- + HERE near column 5 at 1123740.pl line 9.
This is even though the character is in Unicode 6.3.0, which Perl 5.20.0 supports.
So why isn't it working? Help me out, fellow monks.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: "Unrecognized character" while use utf8 is in effect (perldata/Variable names)
by Anonymous Monk on Apr 17, 2015 at 10:07 UTC | |
by AppleFritter (Vicar) on Apr 17, 2015 at 10:20 UTC | |
by Anonymous Monk on Apr 17, 2015 at 10:39 UTC | |
Re: "Unrecognized character" while use utf8 is in effect
by vinoth.ree (Monsignor) on Apr 17, 2015 at 10:32 UTC |