foreach $hashref (@questions){ my $foo = $hashref->{foo} || "daklfjsdalk"; }