#! /usr/bin/perl $in; if ($ENV{'REQUEST_METHOD'} eq "get") { $in = $ENV{'QUERY_STRING'}; } else { $in = ; } $in =~ s/\+/ /g; @detail = split (/&/, $in); print "Content-Type: text/html\n\n"; print "Post has succsesfully submited"; foreach $details(@detail) { %details = split (/=/, $details); while (($name, $value) = each %details) { print "
\n"; $entry .= $value . "#"; } } print "click here to view your post"; $entry = $entry."\n"; open (GBOOK, ">> guestbook.txt"); print GBOOK "$entry"; close (GBOOK); #### #! /usr/bin/perl open (GBOOK, "guestbook.txt"); @entries = ; close (GBOOK); print "Content-Type: text/html\n\n"; print ""; foreach $entry(@entries) { @singles = split (/#/, $entry); print "$singles[0]\n"; print "

\n"; } print "";