You're reading your input line-by-line but you're trying to match across lines. That won't work.
The following should work, reading the input all at once (see perlrun):
perl -g -i -pe ’s/(?<=look)\n(?=ahead)/-/g;’ myfile.txt
In reply to Re^2: Using Look-ahead and Look-behind
by Corion
in thread Using Look-ahead and Look-behind
by Roy Johnson
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |