The problem was (sort of) in the query. The account_id field is a CHAR(48) field and apparently DBI tries to match against all 48 characters rather than just what's in the field. So, even though the query worked in SQLPlus as written, I had to change a line in the criteria to "where trim(account_id) = ?" for it to work in the Perl program.