Here is what i tried and failed,
in the main module ..
$dbh = DBI->connect(...)
&foo(\$dbh)
.
in the sub
sub foo {
$dbref = @_;
$stmt = 'some query'
$$dbref->prepare($stmt);
}
I appreciate your help.
Mo
You're trying far too hard. Reread perlref etc.
$dbh = DBI->connect(...)
foo($dbh);
sub foo {
my($dbref) = @_;
$dbref->prepare(...);
}
Note that "$dbref = @_" will not do anything useful. Reread the
perl manuals about list and scalar contexts.
Tim.