Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: BEGIN { } block

by busunsl (Vicar)
on Aug 11, 2009 at 14:22 UTC ( #787642=note: print w/ replies, xml ) Need Help??


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');


Comment on Re: BEGIN { } block
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://787642]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (11)
As of 2014-07-26 07:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (175 votes), past polls