Are there any fine exemplars of exactly this kind of Perl program on PerlMonks?
No, I am not aware of
either a core module or a battle-tested CPAN module to permit
to the program either on the command line or in a config file
No, my program above permits it, but use custom libraries.
I think you actually can write such code by yourself. It's easy to parse config
and use it as default source, when a command line option is missing. And for
command line you can use GetOpts. Looks like it can fit to 20 lines of code.
However if you want error handling, multiple encodings support, complex config file(s) structure, unit tests for this, etc, it can require times more coding.