in reply to Re: initializing multiple arrays
in thread initializing multiple arrays
You don't, unless you turn off strict refs:
This is, in my experience, most commonly done to auto-generate accessor methods. But turning off strict refs is generally frowned upon. That is why I suggested using a hash to store the names as keys that can be computed.# since strict is a lexical pragma you can put it in a block and let # it return to its former state when you leave the block. { no strict refs; # do something that might be ill-advised ... }
|
|---|