Kunal Bhangale
Kunal Bhangale

Reputation: 67

How to import .env filein perl

I have two perl scripts script1.pl and script2.pl and I want to create one environment.env file which exports the environment variable and we can import environment.env file in both the scripts and use these environment variables

Is anybody knows how to implement this.

Upvotes: 0

Views: 131

Answers (1)

mob
mob

Reputation: 118645

Check out Env::Modify for tasks like this:

use Env::Modify 'source';
source("environment.env");

Upvotes: 1

Related Questions