open (regfile, ">>$datadir/projects\.dat") || "Cannot open File1."; my @regfile = ; close (regfile); open (NEWFILE,">>$datadir/subscribe\.dat") || "Cannot open File2."; foreach $i (@regfile) { ($b, $b, $b, $b, $base_email, $b, $b, $b) = split (/\|/, $i); If ($base_email\|$name\|$date\|$format ne ANY LINE IN NEWFILE) { print NEWFILE "$base_email\|$name\|$date\|$format\n"; } } close (NEWFILE);