It needs to generate the file names when it runs, and there is no parameters that needs to be passed to the sub, I don't understand your comments. "Your subroutine takes no parameters, so no variation is possible. In other words, why waste time generating this at runtime, the returned array is constant...".