warn 'question three does not exist' if ! exists $questions{'three'}; if (lc $question{'three'} =~ /^\s*?false\s*?$/) { $right++; } else { $wrong++; }