Can some one look at this and tell me if it is right, and will it work?
############################################
# Welcome Newest Meber
# What it does...
# simply welcome the newest Member anywhere on your script
################# Step -1- #################
# paste these lines to your config-part
# Directory where the newmember.dat file will
# be stored
$config{'newestmember'} = 'nm';
################# Step -2- #################
# Find these lines in &proreg:
# mkdir("$config{'basepath'}$config{'regdir'}", 0777) unless (-d "$config{'basepath'}$config{'regdir'}");
# and paste this code after it
mkdir("$config{'basepath'}$config{'newestmember'}", 0777) unless (-d "$config{'basepath'}$config{'newestmember'}");
################# Step -3- #################
# scroll down to
# close NEWREG
# and paste this code after it
&oops('We were unable to write to the user directory.') unless (open NEWMEMBER, ">$config{'basepath'}$config{'newestmember'}/newmember.dat");
print NEWMEMBER "$form{'ALIAS'}\n$form{'EMAIL'}";
close NEWMEMBER;
################# Step -4- #################
# put this sub somewhere to your script
# the end will work best :-)
#-#############################################
# Sub: Welcome Message
# This will give out a welcome message to
# the newest member; call it everywhere you
# like with &welcome_msg
sub welcome_msg {
return '' unless -r "$config{'basepath'}$config{'newestmember'}/newmember.dat" and -T "$config{'basepath'}$config{'newestmember'}/newmember.dat";
open FILE, "$config{'basepath'}$config{'newestmember'}/newmember.dat";
my ($alias,$email) = <FILE>;
close FILE;
chomp ($alias,$email);
print "$config{'sitename'} welcomes its newest member <b><a href=mailto:$email>$alias</a><b>";
}