Skip navigation.
Home
Your source for Perl tips, howto's, faq and tutorials
( categories: )

The best way to define constant values is to use the Readonly module:

Example:
use Readonly;
Readonly my $PI => 3.1415926535;

NOTES:
- You can define Readonly scalars, hashes and arrays.
- If you try to modify a Readonly variable, the program will die.