If lots of functions require the same parameter(s), think "objects". Just write a package that stores the DB handle. You can then have finer control over the possible actions (i.e., instead of $self->db->do('that'), you can define methods like $self->this; $self->that etc.)