in reply to Parse mailing addresses with a regex

Slightly off-topic: rather than reading the file as a whole into an array and then going through the array, it is far less memory and resources-consuming (not to say more elegant) to read the file line by line and immediately handle each record as soon as it is read in.

while <CUSTOMERFILE> { # YOUR REGEX AND OTHER THINGS HERE # Note: record just read is in $_ ; works nice with m// }

CountZero

"If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law