lalala00066
lalala00066

Reputation: 59

perl how to include a pre-defined variable list

Is it possible to have a perl file that defines a list of variables with certain values, and then have the main perl script include that file which contains the list of variable definitions?

Or any sort of perl approach which would make that intention work.

Thanks!

Upvotes: 0

Views: 141

Answers (1)

sattva_venu
sattva_venu

Reputation: 715

Store those values in a config file and retrieve it using config parsing in your main perl script. Refer following link for example. https://perlmaven.com/reading-configuration-files-in-perl

Upvotes: 3

Related Questions