produced a "2".my @test = ( 0 ); if ( defined @{ $test[1] }[1] ){} my $l = @test; print $l;
and all is fine again, but where can I find any documentation of this behaviour? It was unexpected to me and I would like to read more about it. Neither perlref nor the perlreftut seemed to document that an element is appended to @test as soon as it is accessed.my @test = ( 0 ); if ( defined $test[1] && defined @{ $test[1] }[1] ){} my $l = @test; print $l;
In reply to defined of a matrix by PerlingTheUK
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |