sybperl-l Archive
Up Prev Next
From: Jamie Thingelstad <jjt at mail dot ConcertoTech dot com>
Subject: Re: Passing a $dbh to a subroutine
Date: Sep 18 1997 6:57PM
Michael Peppler stated:
#
# Yes, absolutely:
#
# my $dbh = new Sybase::DBlib;
#
# do_insert($dbh);
#
# sub do_insert {
# my $dbh = shift;
#
# $dbh->dbcmd(...);
# $dbh->dbsqlexec; $dbh->dbresults;
# }
#
Is there a difference between:
my $dbh = new Sybase::DBlib;
mySub($dbh);
sub mySub ($) {
...
}
and:
my $dbh = new Sybase::DBlib;
mySub(\$dbh);
sub mySub (\$) {
...
}
does pass by reference matter with this?
--
Jamie Thingelstad, CTO (Fax) 612.338.0069 (Voice) 612.338.0049x24
Concerto Technologies 123 North 3rd St. Suite 300, Minneapolis, MN 55401
|