#!C:/perl/bin/perl.exe use CGI::Carp qw(fatalsToBrowser); use CGI; $query = new CGI; # Demo for loop to access elements in an array # Prepare to send HTML code to browser print $query->header; print $query->start_html(-title=>'Thank You'); @colors = ("darkgreen","green","forestgreen","limegreen","chartreuse","lawngreen","greenyellow"); for($i = 0; $i <= 6; ++$i){ print " The index value is currently equal to $i and the color is $colors[$i].
"; } # Good color resource: http://halflife.ukrpack.net/csfiles/help/colors.shtml print $query->end_html;