I recommend that you also use lexical scalars as filehandles (Refer: open). One of their biggest advantages is that they can be passed as simply as any other scalar.
Bill
Comment on Re: Passing a file handle and two arrays to a function by reference.