How to import .env filein perl

Viewed 39

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.

1 Answers

Check out Env::Modify for tasks like this:

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