in reply to Custom File::Path messages

You might want to look at this recent question: Challenge: Capturing stdout from a function call. which asks for something similar.

That said, File::Path is ancient code, and should be one the first modules to be taken out and shot when the revolution (Perl6) comes. Magic-number positional parameters are just so... twentieth century.

I don't mind modules I have to look up in order to remind myself how to use them, but when I have to look a module definition up in order to understand code already written there's something wrong.

Not to mention the fact that a library module that calls print is just wrong, wrong, wrong.

If File::Path were written today, it would use a hash, which would offer you named parameters and thus the code that uses it would be self-documenting. This would avoid the dilemma of what you are supposed to do when you want to set the third positional parameter when you don't care about the second. In this case you have to make a choice about what to set the second to, in order to get at the third.

File::Finder and File::Find::Rule are two other modules with nice interfaces that will let you do what you want.

- another intruder with the mooring of the heat of the Perl