in reply to I need an array of filehandles.

use IO::Handle; it gives you an OO interface, which returns a scalar. You can use the returned scalar just like a normal filehandle, but with the benefit of being able to stuff it in an array or a hash, or whatever;-) if you would like to know more, just see the IO::Handle source code. -tacho