Thanx
I moved the block of code to the top of the script and it worked
In reply to Re^2: Capturing warnings from DBD:PG by HeadScratcher in thread Capturing warnings from DBD:PG by HeadScratcher