Yes, it’s perfectly legal: it’s a special Perl feature called autovivification that brings array or hash elements into existence when they’re referenced. See Autovivification and Autovivification in Perl: An In-Depth Tutorial.
Hope that helps,
| Athanasius <°(((>< contra mundum | Iustus alius egestas vitae, eros Piratica, |
In reply to Re: Accessing uninitialized arrays. Black magic
by Athanasius
in thread Accessing uninitialized arrays. Black magic
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |