in reply to Looping through a hash reference is creating a key...?
Update: Note that if the not-already-existing reference is not dereferenced, but is just read, no autovivification goes on, so your code would work as you'd like if you did:
for (1 .. 4) { my $foo = $questions->{$_} && $questions->{$_}{foo} || "daklfjsdal +k"; }
|
|---|