How do I do this without modifying File_a.pl?I think you do want to modify File_a.pl to use parens instead of curlies List value constructors:
%test_hash = (a=>1, b=>2);
Then you can require in File_b.pl:
require 'a.pl'; foreach (keys %test_hash){ print "$test_hash{$_}\n"; }
In reply to Re: Trying to access hash from external perl file
by toolic
in thread Trying to access hash from external perl file
by ruhroh
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |