in reply to Re^2: dbi question
in thread dbi question

But isnt it rerquired that contructor has the same name like class ?

A constructor can have any name; there are no requirements for constructor names.

DBI->connect() establishes a connection with database.

It does, and it returns an object which represents that connection. You can call methods on that object, including the prepare() method.