Hi guys,

I have a script for a mail list, which adds the name and email address to a text file. I now deen to be able to add the street address, town, county and postcode. I tried modifying the script myself but can't get it to work. Could someone have a go or show me where I'm going wrong?

Here's the part of the script that adds the details to the text file:
sub add {

$dup = 0;

if (-e "$list")
{
open (FILE,"$list") || die "Can't open $list!\n";
@lines=<FILE>;
close(FILE);

foreach $line (@lines) {
&splitlist;
if ($uemail eq $email) {$dup = '1';}
}
}
if ($dup eq '0')
{
while (-f $listlock){select(undef,undef,undef,0.1);}
open(LOCKFILE, ">$listlock");

open (FILE,">>$list");
print FILE "$email=$name=$date\n";
close(FILE);

close(LOCKFILE);
unlink($listlock);
}

&printresult;
}


I tried doing this:

open (FILE,">>$list");
print FILE "$email=$name=$address=$town=$county=$postcode=$date\n";
close(FILE);

but it didn't work.