#!C:/perl/bin/perl.exe
use CGI::Carp qw(fatalsToBrowser);
use CGI;
$query = new CGI;
# Randomly select one item from a list of items
# Demonstrates random assignment to conditions
$pass= $query->param('pass');
$v1= $query->param('v1');
if($pass < 1){
$pass = 0;
}
print $query->header;
print $query->start_html(-title=>'randomization');
print "";
if($pass == 1){
print "Thank you for your response.
";
# save data if desired
}
if($pass == 0){
# Define the stimuli
$cond0= "This applicant received her PhD one year ago from the University of Illinois. Her research is concerned with understanding the cognitive mechanisms underlying individual differences in working memory capacity. She has published four articles in peer-reviewed journals, on two of which she was first author.";
$cond1= "This applicant received his PhD one year ago from the University of Illinois. His research is concerned with understanding the cognitive mechanisms underlying individualdifferences in working memory capacity. He has published four articles in peer-reviewed journals, on two of which he was first author.";
# randomly select a condition
$thisCondition = &randomSelect(0,1);
print "