[Purdue-pm] Unicode Within Perl

David Jacoby jacoby at purdue.edu
Fri Mar 19 09:05:58 PDT 2010


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 Jacoby                         Address: WSLR S049
Genomics Core Programmer            Mail:    jacoby at purdue.edu
Purdue University                   Phone:   765.49.67368


More information about the Purdue-pm mailing list