$dbh and $dbh2 are both the same things. They are scalars whose values are references to the same instance of the Sybase::DBlib class.
A reference is simply a scalar which has a pointer to some memory location as its value. You can treat these scalars just like any other scalar. To dereference them and access their object, though, you use the -> operator.
That said, you should "use strict" and define the scope of all your variables using "my".
perl -le 'print reverse reverse "just another perl hacker"' wush.net subversion hosting - remote hosted revision control with easy admin, ssl security & backups
because the last time I logged in to this forum was probably about 2 years ago and I could not reply to or create any posts because of some stupid message saying I hadn't contributed anthing to the forum.
I simply replied to this post just to get rid of the stupid message everytime I logged in......................huh