#!/perl/bin/perl -w # text analyzer use strict; use CGI qw/:standard/; print header(); print start_html("This will count your words"); # check for param, if params present, then form is submitted if(param()) { my $fname = param ('fname'); if(!$fname){ dienice("You did not enter your name, please click the back button\n"); } # code for assigning variables for each param # get all other data and check if present, otherwise dienice my $email = param('email'); if(!$email){ dienice("You did not enter your email, please click the back button\n"); } my $text2count = param('text2count'); # get a text array from text my @textarray = get_text_array($text); # make a hash out of this array @textarray my %texthash = get_counting_hash(@textarray); # after get all of the values needed, print out the content for the result: print <