in reply to Fastest way to test membership in a constant set

You don't need a readonly hash if you just use a closure...no code outside the block can change the hash:
BEGIN { my %members; undef @members{qw(age old years)}; sub is_member { return exists $members{$_[0]}; } }