ora_errstr is from oraperl. oraperl is perl with Oracle libraries compiled in from before the days of DBI and DBD::Oracle. If you use one (oraperl or DBI) you shouldn't need the other in the same program (and you should only need oraperl if you need to support legacy code). You shouldn't need to set the errstr in either, it is just something that is automatically set (sort of, see
this) after an error. So you can print it (or something) after you detect an error.
Update: Oraperl is also a compatibility module from DBD-Oracle (to make oraperl programs transparently use DBI) so $ora_errstr is likely an alias for $DBI::errstr. Previous comments that you shouldn't need to set the errstr still apply.
Another update: Apparently Oraperl
is no longer supported. I suggest transitioning to pure DBI.