#!/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/</g; #Stops user from entering the < in both name and speech $name =~ s/</g; #Leaves the > 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 "