#!/usr/bin/perl # Loads the CGI Module use CGI; # creates a new CGI object my $page = new CGI; # This will print a standard HTML header print $page->header; # Grab a named CGI parameter my $value = $page->param(Comic); ##########declare the names of the files for the loop @Comm = ('Images/Le_Comic.jpg', 'Images/Le_Comic2.jpg', 'Images/Le_Comic3.jpg', 'Images/Le_Comic4.jpg', 'Images/Le_Comic5.jpg', 'Images/Le_Comic6.jpg', 'Images/Le_Comic7.jpg', 'Images/Le_Comic8.jpg', 'Images/Le_Comic9.jpg'); ########## #Open up the comments file open (FILE, '../Comment.txt') or die "It could not be found."; #Save the contents of the FILE handle to an array @Comment = ; #do a for loop to make it go through the test for ($i=0; $i<=#@Comment; $i++) { #Do an if loop to go through and save the right thing if ($value == $Comm[$i]) { $Como = $Comment[$i]; } } # Then: print "\n"; print < Animetion Station > Webcomic ENDMETA print "\n"; print <
Web Comics


$Como

ENDHTML print "\n";