ado
ado

Reputation: 1471

Perl: Setting up environmental variables without touching code

I have a perl file that want to understand certain environmental variables. So I can add:

$ENV{PLACK_ENV} = 'development'

in the code and its ok.

But is there a way to do this without touching the code?

ps: I'm working with linux

Upvotes: 0

Views: 179

Answers (1)

Taras
Taras

Reputation: 920

You can do this easily

$ export PLACK_ENV=development
$ perl your_script.pl

or

$ PLACK_ENV=development perl your_script.pl

Upvotes: 7

Related Questions