perl -g -i -pe ’s/(?<=look)\n(?=ahead)/-/g;’ myfile.txt