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; }
|
---|
In Section
Seekers of Perl Wisdom