On Mon, 28 Jun 2010 04:51:45 -0400
"Sharma, Sumit" <[email protected]> wrote:
> Hello,
>
>
>
> I am trying to use Perl to identify if a given database exists or not
> and if it doesn't create the database and then connect to it.
>
>
>
> Is there any way using Perl DBI to first identify whether a given
> database exists or not if it doesn't create the database?
Well I am not sure what you are trying to do, but lets say your
database has the name "my_data.db"
Check that my_data.db exists
if (-e my_data.db){connect} else {connect and create}
See how you go from there
Owen