Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Getting a hash from a file

by toolic (Bishop)
on Mar 24, 2010 at 00:39 UTC ( #830426=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://830426]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (6)
As of 2018-01-16 15:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How did you see in the new year?










    Results (182 votes). Check out past polls.

    Notices?