Next | The Perl Hardware Store | DC.pm Version | 13 |
sub PI () { 3 }
Now you can use PI and get 3:
$circum = 2 * PI * $r;
PI is read-only:
PI = 3;
Can't modify constant item in scalar assignment at ...
() enables special function-call syntax
This incantation also enables inlining optimization
Next | Copyright © 2003 M. J. Dominus |