What does your input data look like? Show us a sample of the file you are processing. How confident are you that the structure of the "hash" you are editing won't change? If the file is written by Perl there is a fair chance that you can't depend on the order of the elements.
Perhaps the more important question: what is the problem you are trying to solve? It is likely there is a better solution than a poor man's parse and edit of a text representation of a data structure.
In reply to Re: Replacing a block of text inside two keys with another block of text
by GrandFather
in thread Replacing a block of text inside two keys with another block of text
by victorz22
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |