[The following statement normally appears at the top of any Perl script, without the asterisks]
*****#!/usr/local/bin/perl*****
use CGI;
MAIN:
{
# Read in identifying information
$query = new CGI;
# Extract identifying variables
$Sex = $query->param('Sex');
$Age = $query->param('Age');
$Nick = $query->param('Nick');
$Country = $query->param('Country');
# Check to see that sex was indicated
if ($Sex ne "Male" && $Sex ne "Female") {
print $query->header;
print $query->start_html(-title=>'Failure to Indicate Sex');
print "You did not indicate your sex at the beginning of the inventory. Your answers
cannot be normed properly unless you indicate whether you are male or female.
Please return to the inventory and indicate your sex.";
exit;
}
#Make sure Age is numeric
if ($Age =~ /\D/) {
print $query->header;
print $query->start_html(-title=>'Invalid, Non-numeric Entry for Age');
print "You did not enter your age in numeric digits. For example if you have lived for three decades, you must enter 30 rather than thirty in the Age box. Please return to the previous page and enter your age properly.";
exit;
}
#Make sure respondent is at least 10 years old
if ($Age < 10) {
print $query->header;
print $query->start_html(-title=>'Age in Invalid Range');
print "You did not indicate how old you are at the beginning of the inventory, or you
typed in an age that is too young. Your answers cannot be normed properly
unless you type in a valid age. Please return to the inventory and change your response.";
exit;
}
if ($Age > 99) {
print "Are you really as old as you have indicated? If you really are that old, congratulations on living so long! But to make data processing easier, I want to limit ages to two-digit numbers. If you really are 100 years old or older, please return to the previous page and enter a 99 for your age.";
exit;
}
if ($Country !~ /\w/) {
print $query->header;
print $query->start_html(-title=>'Country Not Indicated');
print "You did not indicate which country you are from. Indicating where you are from will help build better norms that will improve the validity of this test. Please return to the previous page and indicate the country to which you feel you belong the most.";
exit;
}
#Generate random nickname if nickname is blank
if ($Nick !~ /\w/) {
$Nick = &random_password(23);
}
#Truncate long Nicknames
$str_length = length($Nick);
if ($str_length > 23) {
($Nick = substr($Nick, 0, 23));
}
#Pad short Nicknames
$blank_str = " ";
while ($str_length < 23) {
$Nick .= $blank_str;
$str_length = length($Nick);
}
# Get the item responses
for ($i = 1; $i < 61; $i++) {
$item = "Q$i";
$Q[$i] = $query->param($item);
}
# Print the header and start HTML
print $query->header;
print $query->start_html(
-title=>'IPIP-NEO-PI Short Form Items 61-120');
print < 61. Am afraid of many things. 62. Avoid contacts with others. 63. Love to daydream. 64. Trust what people say. 65. Handle tasks smoothly. 66. Lose my temper. 67. Prefer to be alone. 68. Do not like poetry. 69. Take advantage of others. 70. Leave a mess in my room. 71. Am often down in the dumps. 72. Take control of things. 73. Rarely notice my emotional reactions. 74. Am indifferent to the feelings of others. 75. Break rules. 76. Only feel comfortable with friends. 77. Do a lot in my spare time. 78. Dislike changes. 79. Insult people. 80. Do just enough work to get by. 81. Easily resist temptations. 82. Enjoy being reckless. 83. Have difficulty understanding abstract ideas. 84. Have a high opinion of myself. 85. Waste my time. 86. Feel that I'm unable to deal with things. 87. Love life. 88. Tend to vote for conservative political candidates. 89. Am not interested in other people's problems. 90. Rush into things. 91. Get stressed out easily. 92. Keep others at a distance. 93. Like to get lost in thought. 94. Distrust people. 95. Know how to get things done. 96. Am not easily annoyed. 97. Avoid crowds. 98. Do not enjoy going to art museums. 99. Obstruct others' plans. 100. Leave my belongings around. 101. Feel comfortable with myself. 102. Wait for others to lead the way. 103. Don't understand people who get emotional. 104. Take no time for others. 105. Break my promises. 106. Am not bothered by difficult social situations. 107. Like to take it easy. 108. Am attached to conventional ways. 109. Get back at others. 110. Put little time and effort into my work. 111. Am able to control my cravings. 112. Act wild and crazy. 113. Am not interested in theoretical discussions. 114. Boast about my virtues. 115. Have difficulty starting tasks. 116. Remain calm under pressure. 117. Look at the bright side of life. 118. Believe that we should be tough on crime. 119. Try not to think about the needy. 120. Act without thinking.
Inaccurate
Inaccurate
nor Inaccurate
Accurate
Accurate
Inaccurate
Inaccurate
nor Inaccurate
Accurate
Accurate
Inaccurate
Inaccurate
nor Inaccurate
Accurate
Accurate
Inaccurate
Inaccurate
nor Inaccurate
Accurate
Accurate
Inaccurate
Inaccurate
nor Inaccurate
Accurate
Accurate
Inaccurate
Inaccurate
nor Inaccurate
Accurate
Accurate
Inaccurate
Inaccurate
nor Inaccurate
Accurate
Accurate
Inaccurate
Inaccurate
nor Inaccurate
Accurate
Accurate
Inaccurate
Inaccurate
nor Inaccurate
Accurate
Accurate
Inaccurate
Inaccurate
nor Inaccurate
Accurate
Accurate
Inaccurate
Inaccurate
nor Inaccurate
Accurate
Accurate
Inaccurate
Inaccurate
nor Inaccurate
Accurate
Accurate
Inaccurate
Inaccurate
nor Inaccurate
Accurate
Accurate
Inaccurate
Inaccurate
nor Inaccurate
Accurate
Accurate
Inaccurate
Inaccurate
nor Inaccurate
Accurate
Accurate
Inaccurate
Inaccurate
nor Inaccurate
Accurate
Accurate
Inaccurate
Inaccurate
nor Inaccurate
Accurate
Accurate
Inaccurate
Inaccurate
nor Inaccurate
Accurate
Accurate
Inaccurate
Inaccurate
nor Inaccurate
Accurate
Accurate
Inaccurate
Inaccurate
nor Inaccurate
Accurate
Accurate
Inaccurate
Inaccurate
nor Inaccurate
Accurate
Accurate
Inaccurate
Inaccurate
nor Inaccurate
Accurate
Accurate
Inaccurate
Inaccurate
nor Inaccurate
Accurate
Accurate
Inaccurate
Inaccurate
nor Inaccurate
Accurate
Accurate
Inaccurate
Inaccurate
nor Inaccurate
Accurate
Accurate
Inaccurate
Inaccurate
nor Inaccurate
Accurate
Accurate
Inaccurate
Inaccurate
nor Inaccurate
Accurate
Accurate
Inaccurate
Inaccurate
nor Inaccurate
Accurate
Accurate
Inaccurate
Inaccurate
nor Inaccurate
Accurate
Accurate
Inaccurate
Inaccurate
nor Inaccurate
Accurate
Accurate
Inaccurate
Inaccurate
nor Inaccurate
Accurate
Accurate
Inaccurate
Inaccurate
nor Inaccurate
Accurate
Accurate
Inaccurate
Inaccurate
nor Inaccurate
Accurate
Accurate
Inaccurate
Inaccurate
nor Inaccurate
Accurate
Accurate
Inaccurate
Inaccurate
nor Inaccurate
Accurate
Accurate
Inaccurate
Inaccurate
nor Inaccurate
Accurate
Accurate
Inaccurate
Inaccurate
nor Inaccurate
Accurate
Accurate
Inaccurate
Inaccurate
nor Inaccurate
Accurate
Accurate
Inaccurate
Inaccurate
nor Inaccurate
Accurate
Accurate
Inaccurate
Inaccurate
nor Inaccurate
Accurate
Accurate
Inaccurate
Inaccurate
nor Inaccurate
Accurate
Accurate
Inaccurate
Inaccurate
nor Inaccurate
Accurate
Accurate
Inaccurate
Inaccurate
nor Inaccurate
Accurate
Accurate
Inaccurate
Inaccurate
nor Inaccurate
Accurate
Accurate
Inaccurate
Inaccurate
nor Inaccurate
Accurate
Accurate
Inaccurate
Inaccurate
nor Inaccurate
Accurate
Accurate
Inaccurate
Inaccurate
nor Inaccurate
Accurate
Accurate
Inaccurate
Inaccurate
nor Inaccurate
Accurate
Accurate
Inaccurate
Inaccurate
nor Inaccurate
Accurate
Accurate
Inaccurate
Inaccurate
nor Inaccurate
Accurate
Accurate
Inaccurate
Inaccurate
nor Inaccurate
Accurate
Accurate
Inaccurate
Inaccurate
nor Inaccurate
Accurate
Accurate
Inaccurate
Inaccurate
nor Inaccurate
Accurate
Accurate
Inaccurate
Inaccurate
nor Inaccurate
Accurate
Accurate
Inaccurate
Inaccurate
nor Inaccurate
Accurate
Accurate
Inaccurate
Inaccurate
nor Inaccurate
Accurate
Accurate
Inaccurate
Inaccurate
nor Inaccurate
Accurate
Accurate
Inaccurate
Inaccurate
nor Inaccurate
Accurate
Accurate
Inaccurate
Inaccurate
nor Inaccurate
Accurate
Accurate
PLEASE NOTE: Your results should appear on your screen within moments after clicking the Send button. If nothing happens, something has gone wrong. Clicking the button again and again will not help.
Inaccurate
Inaccurate
nor Inaccurate
Accurate
Accurate
As I indicated in the warning at the beginning of the test, I am a psychologist, not a computer technician, so I have no definitive way of solving any person's particular computer problem. For people who were unable to complete the test, sometimes using a better computer, faster internet connection, or just taking the test on a different day and time led to success. If you experience difficulties, you can email me if you like (j5j at psu.edu), but I won't be able to tell you anything more than what I have just said here.
This
will send your answers to be scored and post your results.
ENDOFTEXT
print $query->end_html;
}
# Name: random_password()
#
# Author: Chris Hunt
#
# Date: May 1999
#
# Purpose: Returns a random word for use as a password. Consonants and vowels
# are alternated to give a (hopefully) pronouncable, and hence
# memorable, result.
#
# Arguments: The single (optional) argument sets the approximate length of the
# word. Use of dipthongs (two-letter combinations) may make the word
# exceed this length by 1. If the argument is omitted, a default
# value (6) is assumed.
#
# Usage: $my_new_password = &random_password();
# $my_long_password = &random_password(10);
#
# (c)1999 Chris Hunt. Permission is freely granted to include this script in
# your programs. provided this header is left intact.
#
# The latest version of this script can be found at http://www.extracon.com
#
sub random_password {
($maxlen) = $_[0] || 6; # Default to 6
# Build tables of vowels & consonants. Single vowels are repeated so that
# resultant words are not dominated by dipthongs
(@vowel) = ("a", "a", "a", "e", "e", "e", "e", "i", "i", "i",
"o", "o", "o", "u", "u", "y", "ai", "au", "ay", "ea",
"ee", "eu", "ia", "ie", "io", "oa", "oi", "oo", "oy");
(@consonant) = ("b", "c", "d", "f", "g", "h", "j", "k", "l",
"m", "n", "p", "qu", "r", "s", "t", "v", "w", "x", "z", "th", "st",
"sh", "ph", "ng", "nd");
($password) = "";
srand;
($vowelnext) = int(rand(2)); # Initialise to 0 or 1 (ie true or false)
do {
if ($vowelnext) {
$password .= $vowel[rand(@vowel)];
} else {
$password .= $consonant[rand(@consonant)];
}
$vowelnext = !$vowelnext; # Swap letter type for the next one
} until length($password) >= $maxlen;
return $password;
}