use CGI qw(:standard); print header; print start_html (-title=>'graded quiz', -BGCOLOR=>'beige'); # The match doesn't work if more than one character is matched if(param('s1') =~ m/ad/i) { print "
Correct! Congradulations! Your answer was a

"; }else{ print "
Incorrect! You did not mark the correct answer!

"; } print "
The value for s1 is: "; print param('s1'); print "

"; print "The value for s2 is: "; print param('s2'); print "

"; print "The value for s3 is: "; print param('s3'); print "

"; print "The value for s4 is: "; print param('s4'); print "

"; print "


"; foreach $key (param()) { print "NAME = "; print $key; print " and VALUE = "; print param($key); print "

"; } print "


"; # Only the first character of the value is printed. Why? foreach $key (param()) { print "NAME = " . $key . "and VALUE = " . param($key) . "

"; } print end_html;