in reply to locking arrays?

I was looking on CPAN for something else and stumbled across just the module you're looking for: Readonly.

The POD's first line says:

Readonly - Facility for creating read-only scalars, arrays, and hashes.

use Readonly; Readonly::Array my @arr => @values;

It appears to be just that easy. Read the POD though. Apparently there is a considerable speed-performance hit. The POD states that if you can also install the Readonly::XS module on your system, the performance hit is substantially mitigated.

Hope this helps!


Dave


"If I had my life to live over again, I'd be a plumber." -- Albert Einstein