while () { if (/regex/) { s/.../.../; s/.../.../; print FILE_2; } }