in reply to undefined value as an ARRAY reference sometimes ok
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: undefined value as an ARRAY reference sometimes ok
by Anonymous Monk on Dec 13, 2011 at 23:52 UTC | |
by chilledham (Friar) on Dec 13, 2011 at 23:57 UTC |