in reply to Write to file

As mentioned (indirectly) by Fletch, Tie::File probably fits your needs best. It allows you to treat a file as an array. Anything you do to the array will be reflected by the file. I just wanted to provide some usage tips: