Why doesn't this code generate a warning or error? Expected the attempt to dereference the undef value, $array_ref->[0], would result in an error or at least warning.
use strict;
use warnings;
my $array_ref = [undef];
if ($array_ref-> [0]->{whatever}){
print "true";
}
else {
print "false";
}