in reply to Re^2: Modifying/Accessing hash in separate script
in thread Modifying/Accessing hash in separate script
Can you post a bit of how the hash is declared in the one script, and how it is used in the other?
Maybe you have
# config.pl $config{ base_dir } = '/opt/myapp'; $config{ bin_dir } = "$config{ base_dir }/bin";
... and then in the main program(s):
require 'config.pl'; print "My config is $config{ base_dir }\n";
Then you can add use strict to both files if you add use vars '%config'; to both of them.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Modifying/Accessing hash in separate script
by mdskrzypczyk (Novice) on Jul 22, 2015 at 19:22 UTC |