You might find that Tie::File could be used for something like this.
In reply to Re: Updating fields in a text file by ptum in thread Updating fields in a text file by wendy24