Gossamer Forum
Home : General : Perl Programming :

Matt's WWWBoard.

Quote Reply
Matt's WWWBoard.
I m trying to make a modification to Matt's WWWboard but can't find a way how to do it.

The script is available for FREE download, if you want to have a


copy you can download it to have a view.
http://www.scriptarchive.com/...s=wwwboard&c=zip


I want to change the new file subroutine


----------------Currently---------------------
sub new_file {

open(NEWFILE,">$basedir/$mesgdir/$num\.$ext") || die $!;
print NEWFILE "<html>\n";
print NEWFILE " <head>\n";
and so on.

--------Modifications I want to make--------------------

First thing I want to name the new file differently

i.e open(NEWFILE,">$basedir/$mesgdir/$num.$email\.$ext") || die $!;

I want to add $email in the file name (not a big deal, I have added it)

but the basic purpose of writing in the email in name of file is to prevent duplicate entry of the same message. Now here comes the 2nd modification that how to prevent duplicate entry??????


Is there any addition could be made to New File subroutine that first it checks the directory for the file with same name, if it already exists then there should be no further execution of subroutine?
Subject Author Views Date
Thread Matt's WWWBoard. zeshan 5586 Mar 19, 2003, 5:42 PM
Post Re: [zeshan] Matt's WWWBoard.
Paul 5464 Mar 20, 2003, 1:29 AM
Thread Re: [zeshan] Matt's WWWBoard.
Andy 5453 Mar 20, 2003, 6:54 AM
Thread Re: [Andy] Matt's WWWBoard.
zeshan 5445 Mar 20, 2003, 10:24 AM
Post Re: [zeshan] Matt's WWWBoard.
zeroisgod42 5378 Apr 2, 2003, 8:12 PM