This would be a far better question -- i.e., one that would be easier for us to help you with -- had you included some explanation of what's going wrong -- error messages; erroneous output (that is, output other than what you expected and wanted); computer begins to smoke; etc.
My guess, however, is that perhaps you saw something like this (where <t>nn is perhaps 14, 15, or 16, depending on what your header (hashbang, strict, warnings, etc) contains.):
Use of uninitialized value within %dic in substitution iterator at 110 +0671.pl line nn, <F> line 3. Use of uninitialized value within %dic in substitution iterator at 110 +0671.pl line nn, <F> line 3.
If so, Perl is basicly telling you it ran out of input at line 3 of your input file... which makes a lot of sense since your sample shows only two lines in the input file.
An ordinary way to deal with this is to read from F in a WHILE construct; other would be to test the read result for content (ie, len != 0 or similar).
UPDATE: PS: put code tags around data, as well as around code.
In reply to Re: Multiline Regex replacement in Multiline file
by ww
in thread Multiline Regex replacement in Multiline file
by akamboj84
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |