How about:
while(<TMPFILE>) { if (/myword/) { $_.=<TMPFILE>; print; } }
Basically, if the current line matches read and append the next line and print. The while loop only reads one line at a time(unless you change $/), so the nextline will just not be in $_ in your code, you have to read it in when you match myword.
HTH
In reply to Re: Two lines Regular Expression
by pzbagel
in thread Two lines Regular Expression
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |