awk help

Hi,

The file has following data.

$cat junk1.txt
123|abc@yahoo.com|345
234|abcyahoo.com|456

I want to use the awk command and find out whether the field 2 has valid email id of not. If not send hte record to other file. I don want to read line by line and grep and find out.I want to process the whole file in single go.

Any help.

Try,

$ nawk -F '|' '$2 ~ /^[^@]+@[^@]+$/' junk1.txt