http://www.perlmonks.org?node_id=830426


in reply to Getting a hash from a file

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