Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
perl -Mutf8 -MMath::Trig -E 'use constant π => pi; say π'3.14159265358979
perl -Mutf8 -MMath::Trig=:pi -C -E 'use constant π² => pi2; say π²'Unrecognized character \x{b2}; marked by <-- HERE after constant π<-- HERE near column 15 at -e line 1.
perl -Mutf8 -MMath::Trig=:pi -C -E 'use constant q(π²) => pi2; say π²'Constant name 'π²' has invalid characters at -e line 1. BEGIN failed--compilation aborted at -e line 1.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Unicode constant
by haukex (Archbishop) on Nov 07, 2019 at 07:39 UTC | |
by ikegami (Patriarch) on Nov 07, 2019 at 09:40 UTC | |
|
Re: Unicode constant
by Anonymous Monk on Nov 08, 2019 at 00:49 UTC | |
by Anonymous Monk on Nov 08, 2019 at 01:33 UTC |