in reply to Lost with DBI in postgresql

It may be as simple as removing the extra semi-colon in your prepare statement (the one inside the double quotes doesn't belong there). If that's not it, you'll have to show us more because the rest of the code looks fine.