I have the following lines in my script...
Line #10> $mybd='test';
Line #22> my $dbh = DBI->connect("DBI:Pg:dbname=$mydb") || die "Can't
connect to $data_source: $DBI::errstr";
...and I am getting the following error...
DBI->connect(dbname=) failed: FATAL 1: at test2.pl line 22
Can't connect to : FATAL 1: at test2.pl line 22.
I have tried many different methods of addressing this issues, and yes it
works if I put the name directly in the DBI->connect call. How can I use a
variable to set the database name for which I need to establish a
connection.
Thanks,
Patrick