$File =~ s/\[$Field]/$FORM{$Field}/g; # do you need an 'e' too? } print MAIL "$File\n"; } close (MAIL); }