http://qs321.pair.com?node_id=787642


in reply to BEGIN { } block

Sometimes you have to make sure that some environment variables are set.

For example some settings for a connection to a database:

BEGIN { $ENV{NLS_LANG} = 'GERMAN'; $ENV{NLS_DATE_FORMAT} = 'YYYY-MM-DD'; $ENV{NLS_TIMESTAMP_FORMAT} = 'YYYY-MM-DD HH24:MI:SS'; } use DBI; my $dbh = DBI->connect('dbi:Oracle:db', 'user', 'pw');