http://www.perlmonks.org?node_id=882083


in reply to Re^2: eof not recognised when applying diamond operator to invocation arguments?
in thread eof not recognised when applying diamond operator to invocation arguments?

Mainly because it's unnecessarily hard to understand:  eof(); WTF?  Why does it have to be before the loop? If you move it after the loop, it will work with Perl 5.12 just fine, too, but not with 5.10.  Also, someone (including yourself) looking at this later might figure the additional array @filenames is superfluous (and remove it), etc.

Any compelling reason you can't use the more direct version you mentioned yourself elsewhere in the thread?