#!/usr/bin/perl use strict; use warnings; BEGIN { # This BEGIN block must come before "use DBI" and before "use DBD::Oracle", or this trick won't work! $ENV{'WHATEVER_ORACLE_WANTS'}='is set here'; $ENV{'MAYBE_EVEN_SEVERAL'}='environment variables'; } use DBI qw( ... ); # maybe hidden in your database handling module