See: What does Autovivify mean?
Calling $list->[0] causes $list to autovivify. You can see this happening here:
#!perl use strict; my $list = undef; print ref $list, "\n"; # should print only a blank line my $item = $list->[0]; print ref $list, "\n"; # should print ARRAY
In reply to Re: undefined value as an ARRAY reference sometimes ok
by chilledham
in thread undefined value as an ARRAY reference sometimes ok
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |