in reply to Re^2: Working with a unkown number of arrays
in thread Working with a unkown number of arrays

I still don't understand the need for extra variables. Why create code that creates an array and then iterates over it later when you can just iterate in place without the variable? Aka, this:
foreach (readdir DIR) { # do stuff }
seems vastly superior to this:
foreach (readdir DIR) { ... push(@array, $_); ... } foreach (@array) { # do stuff }
Why the added step?

On a side note, I still stand by sorted hashes rather than arrays as the correct way to do this.