in reply to Constants and perl

There's also Const, which works differently than what you've got here (and differently than the constant pragma). Instead of using subroutines, it uses tied variables. This lets you use the constants as hash keys directly, which is nice.

Use it like this: (taken from the manpage)

use Const; const my $SCALAR1 => 10 ;
There's a post on perl5-porters about constant/readonly values: Re: Proposed pragma: readonly - summary. I believe most of these are just proposals, but it's rather interesting.