Meriwether Lewis wrote: > Hi Experts! > > Hoping someone can help me out. Here goes... > bear with me, please. > I have a file that contains a few email > addresses. I read this file and push each line > into an array: > > push(@AddrArray, $_); > > Then I do a foreach on the contents of the > array: > > foreach $AddrToCheck (@AddrArray) {
Beware that at this point you may well still have newlines at the end of each record. Make sure you have 'chomp'ed each record, otherwise it won't validate as an email address. Also, the easiest way to put all the lines from a file into an array is this: open EMAILS, "emails.txt" or die $!; my @AddrArray = <EMAILS>; close EMAILS; chomp @AddrArray; HTH, Rob -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]