in reply to locking arrays?

You may be able to use Tie::Array to tie the array to an object. Using Tie::StdArray you can selectively overload the object methods that can act upon the tied array.

It's probably not trivial to dive into all that for the first time (I haven't done it myself). But it looks like the tools are all there for the using.

From the Tie::Array POD:

The Tie::StdArray package provides efficient methods required for tied arrays which are implemented as blessed references to an "inner" perl array. It inherits from Tie::Array, and should cause tied arrays to behave exactly like standard arrays, allowing for selective overloading of methods.

I hope this gets you going in the right direction.


Dave


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