http://qs321.pair.com?node_id=189790


in reply to Edit File in place

Another thing you may want to research is Tie::File it'll allow you to edit files in the way you want but won't require you to read the entire file into memory. This is a very nice thing if you're working on some rather large files. If the files are small this may be overkill.