http://www.perlmonks.org?node_id=27115


in reply to How do I pass a database handle in DBI between subroutines?

Just like you would any other object... See my example below showing passing a database handle in and out of 2 functions.
my $dbh=bar(); foo($dbh); sub foo{ my $dbh=shift; # do something with the database handle.... } sub bar{ my $dbh=DBI->connect(...... return $dbh; }