How would you do it?Since you asked, my answer is "I don't".
I've written a lot of Perl code over the many years. Rarely have I needed to "initialize" anything. Maybe it's the class of problems I solve, but I generally just let autoviv take care of fleshing out my arrays and hashes as I need them.
Letting undef stand in for either an empty string or the zero value is amazingly handy.
-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.
In reply to Re: General Solution: initializing multidimensional arrays
by merlyn
in thread General Solution: initializing multidimensional arrays
by Roy Johnson
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |