An alternative might be a tied hash, where the key is the email address. - Roger - ----- Original Message ----- From: "Chris Zampese" <[EMAIL PROTECTED]> To: "perl list" <[EMAIL PROTECTED]> Sent: Wednesday, January 30, 2002 2:10 AM Subject: simple file question
Hello everyone, I have a variable $myvar (an email address), and I would like to open a simple text file which contains email addresses (one on each line) and check to see if the address in $myvar is in there, if it is not, then append it o the end of the file, and if it is, then close the file and carry on with the rest of the script. I have tried using while (<FILEHANDLE>){}, but I am not really sure what to put in the brackets? Thanks as always, Chris. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]