#!C:/perl/bin/perl.exe use CGI; $query = new CGI; $v01= "I feel that I'm a person of worth, at least on an equal plane with others."; $v02= "I feel that I have a number of good qualities."; $v03= "All in all, I am inclined to feel that I am a failure."; $v04= "I am able to do things as well as most other people."; $v05= "I feel I do not have much to be proud of."; print $query->header; print $query->start_html(-title=>'Self-Esteem Test'); print ""; print "This page is designed to assess your self-esteem.

Please answer the following questions. Once you have answered each question, click the button labeled calculate my score. The web page will then calculate your self-esteem score, and tell you more about how you compare to others.

"; print "
"; @varlist= ("v01", "v02", "v03", "v04", "v05"); srand; @new = (); while (@varlist){ push(@new, splice(@varlist, rand @varlist,1)); } @varlist= @new; for($i = 0; $i <= 4; ++$i){ $question= $varlist[$i]; print " $$question
"; print"Strongly Disagree Strongly Agree


"; } print ""; print "
"; print $query->end_html;