in reply to SQL - Subroutine always returning true

Some databases return trailings blanks in fixed length string fields. This can cause 'eq' comparisons to fail.
To remove the blanks, set $dbh->{ChopBlanks}=1.

Yes, I know that this was not he problem here, but it doesn't hurt to remind people of the pitfalls given an opportunity.

/me leaving soapbox.