in reply to Good-bye Unix filter idiom

In my module Data::Unixish, I am using this idiom:

while (my ($index, $item) = each @ary) { ... }

I picked each() over $iterator->next() as the former is much faster and works with Perl arrays. This way, my data can be a Perl array, or a file handle (accessed via array using Tie::File), or STDIN/files in command-line arguments (the diamond operator, accessed via array using Tie::Diamond) and I don't need to care.

So, long live the Unix filter idiom :)