in reply to How to connect multiple databases with single sub routine connection using perl?
Perl permits the passing of arguments to subroutines. See perlsub.