#!/usr/bin/perl # use Term::ReadKey; use CGI qw(:standard); # use Data::Dumper; print header; print start_html('Leave Comments on Fyre'), h1('Leave Comments on Fyre'), start_form, "Note, all fields are optional, but empty comments will be ignored.
", "Name: ", textfield(-name=>'name',-default=>''), "E-mail: ", textfield(-name=>'e-mail',-default=>''), "Your Comments:
", textarea(-name=>'Comments',-rows=>10,-columns=>50,-default=>''), '
', submit('Submit'), reset, end_form, p, hr; if (param() && param('name') ne '' && param('Comments') ne '') { $date = `date '+%H:%M %m/%d/%Y'`; # @comments = param('Comments'); # $toString = ""; # print Dumper \@comments; # foreach $comments (@comments) { # if ($comments eq "\n") { # $toString = $toString + '
'; # } # else { # $toString = $toString + $_; # } # } print 'Your comment has been posted.

'; @foo = "\n\n" . '
' . param('name') . ' ' . "\n" . '' . param('e-mail') . ' ' . "\n" . '' . $date . '' . "\n" . '
' . param('Comments') . '

'; push @foo, `cat mk.txt`; open CFILE, ">mk.txt" or die "Failed to open comments file!"; print CFILE @foo; close CFILE; } @foo = `cat mk.txt`; print @foo; print 'This program is open source, and released under the GPL by Ben McIlwain, 2002. See the source here.'; print end_html;