Hey, I'm a Perl newbie heh and I was just wondering if any of the people here could give me any feed back, this is a chat program I made, (well the actual program part) it is put into a frame with a page that it appends to that is located outside of my cgi-bin so that perl scripts are'nt executed, any ways here it is lol.
#!/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 w
+ithout <
$say =~ s/!{5}/!/g; #Although this won't take care of all mul
+tiple ! it can reduce
#the number to help avoid multiple lines of just !'s
open CHAT, ">>../chatty2.html";
print CHAT "<h5><i>",$name,": </i><b>",$say,"</b></h5>\n";
close CHAT
}
print end_html;
I'm proably doing a bunch of stuff wrong heh, any feed back you can provide would be helpful, thanks :)