On Wed, Apr 06, 2011 at 10:24:37AM +0200, marcos rebelo wrote: > Hi all > > I have already lost one day around coding and documentation with this > problem, so I'm asking for help with DBD::Oracle. > > I'm working around the unicode and BLOB problem. Can someone help me > setting the fooling code running and correctly undling the Unicode > part > > use strict; > use warnings; > use v5.10; > > use utf8; > > use DBD::Oracle qw(ORA_BLOB ORA_CLOB SQLT_CHR SQLT_BIN); > use DBI; > use Data::Dumper; > > local $ENV{'ORACLE_HOME'} = ( $ENV{'ORACLE_HOME'} || > '/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/' ); > local $ENV{'NLS_LANG'} = "AMERICAN_AMERICA.AL32UTF8";
I don't have Oracle around to test, but I beleieve the problem (or, at least, a problem) is that these environment variables are being set too late. Put them in a BEGIN block, move them up to before you use DBD::Oracle, and lose the local keyword. Alternatively, get rid of those lines completely, and set up environment appropriately before invoking perl. Good luck, -- Paul Johnson - p...@pjcj.net http://www.pjcj.net -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/