I get a file that contains
First Name Last Name Email Phone
Mel Tate mel@foods.com 773-247-8586
Grady Tatum gt@gtbikes.com 414-345-3333
I want to "grep" the first name and email
so the psudocode would be something like this
1. open file
2. throw out first line
3. read next line
4. $fname=grep([A-Z][a-z])
5. $email=grep{[A-Z][a-z][0-9]@[A-Z][a-z][0-9].[A-Z][a-z][0-9])
6. goto next line in file, repeat steps 4-6
How do i read from a file, line by line? What is the correct syntax for my regular expressions?
Thanks,
Abe