in reply to connect database
Don't hide errors. Use use strict; and use warnings;.
user=postgres
should be
'postgres'
As is, it means
'user' = 'postgres'
and it doesn't make sense to assign to a constant string.
You have an argument missing. While the option hash is optional, the password isn't. It must appear between the user name and the option hash, even if it's only ''.
I don't think quotes are allowed around the dbname. They're definitely not needed.
"DBI:Pg:dbname='five'; port=5432"
should be
"DBI:Pg:dbname=five;port=5432"
... or just
"DBI:Pg:dbname=five"
since port 5432 is the default.
Update: Added last two bullets.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: connect database
by Bass-Fighter (Beadle) on Jan 08, 2009 at 13:06 UTC | |
by ikegami (Patriarch) on Jan 08, 2009 at 13:09 UTC | |
by Bass-Fighter (Beadle) on Jan 08, 2009 at 13:15 UTC |