in reply to Getting a hash from a file
I shortened your .pm file to look like this (just as a test case):
Then your main script would look like:%Verbs = (a=>1, b=>2);
See also: Re: Calling a Variable from another fileuse strict; use warnings; use Data::Dumper; my %Verbs = do 'cmd_verbs_test.pm'; print Dumper(\%Verbs); __END__ $VAR1 = { 'a' => 1, 'b' => 2 };
|
---|
In Section
Seekers of Perl Wisdom