#!/usr/local/bin/perl use CGI; use CGI ':standard'; print header; print start_html('Chat'), h1('Chat'), start_form, "Name ",textfield('name'), p, "Say ",textfield('say'), p, submit, end_form, hr; if (param()) { $say=(param('say')); $name=(param('name')); $say =~ s/ allowed, you can't enter HTML without < $say =~ s/!{5}/!/g; #Although this won't take care of all multiple ! it can reduce #the number to help avoid multiple lines of just !'s open CHAT, ">>../chatty2.html"; print CHAT "
",$name,": ",$say,"
\n"; close CHAT } print end_html;