sub get_std_test { die +(caller(0))[3].' cannot be called in void context' if not defined wantarray; $/ = "===\n"; # set our delimiter my %config = mcas::get_config(); # returns a hash of all config vars my $count = 0; my @questions; open QUESTIONS, ') { if (rand($.) < 1) { if ($count == $config{num_questions_per_test}) { last; } else { push @questions, $_; $count++ } } } close QUESTIONS; die "\$count = $count, < num_questions_per_test config var" if ($count < $config{num_questions_per_test}); return @questions; }