in reply to vbs to perl conversion problem
Most likely $DB->Login failed and Contact doesn't exist as a result. Check that username and password are as expected and check the result of Login if possible.