in reply to multiple db connects

While in scope and until you issue $dbh->disconnect you will have a database connection. So, as others have pointed out, you have to initiate the code via a sub in your required file. Recall that require does nothing more than act like include. No actual code in the required file will be executed without express written permission from the programmer.

ALL HAIL BRAK!!!

Replies are listed 'Best First'.
Re (tilly) 2: multiple db connects
by tilly (Archbishop) on Dec 21, 2000 at 17:31 UTC
    Actually the first time you require a file you execute the whole thing. The second time nothing happens.

    This is normally used with files that don't carry out any obvious actions. But it is very important to know that actions are taken if your require needs to carry on specific initializations...