Tie::File allows one to access a file as thought it were an array; one line of the file per array element. I don't know what a boardTree object is, but if you have control over over its source, you can have it write things to a file and access them from there via a tied interface...but only if it makes sense to access them as an array (which it looks like it might based on how you are initializing your array). Come to think of it, couldn't you tie your @holes array to Tie::File?