in reply to Calling variables from external file, with strict
use Config::Properties. It is the easiest way that I know.
Code first
use Config::Properties; use Data::Dumper; my $propertyFile = new Config::Properties; open (FD, "property.properties") or die "Could not open file: !$"; $propertyFile->load( (*FD) ); close(FD); print Dumper $propertyFile;
Now a external properties file. save as property.properties
var = value one = 1 two = 2 oneandone = 2
HTH - Kristofer
|
|---|