Not sure if it will do exactly what you want, but I'm thinking that Tie::File might work. You open the file for read/write access when you tie the file to an array. Then using array manipulations, you can add/remove/modify the contents of the file. Then the file is closed when you untie the file.
In reply to Re: Capture Contents AND Overwrite without Opening Twice?
by dasgar
in thread Capture Contents AND Overwrite without Opening Twice?
by mmartin
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |