List::Util. Will have to think about that one. It is elegant, but does not do the same as the original code. The original code removes the file argument from the list. The list is later used in the last call, so that removal is vital.
Support input option: I like it. Applied and pushed
Perl version. That needs a lot more testing. I had something similar in before, but something broke, so there will be or might have been situations where that didn't work
Thanks for your interest