[Purdue-pm] Unicode Within Perl
Mark Senn
mark at ecn.purdue.edu
Fri Mar 19 09:55:18 PDT 2010
Dave Jacoby wrote at 2010-03-19 12:05:58 -0400:
> After the last meeting, Mark, Joe and I talked a little about coding in
> Unicode, among other things.
>
> I have just tried some stuff quick. My go-to unicode symbol, u00b0 or °,
> the degree symbol, is rejected as a variable-name character. But pi, π,
> is accepted for variable names. Which is interesting.
>
> #!/usr/bin/perl
>
> use 5.010 ;
> use utf8 ;
> use strict ;
> use warnings ;
> binmode STDOUT , ':utf8' ;
>
> my $π = 'pi' ;
> say $π ;
Dave, Does
http://www.perlmonks.org/?node_id=793800
answer your question? -mark
More information about the Purdue-pm
mailing list