http://qs321.pair.com?node_id=1037020

r0adawg has asked for the wisdom of the Perl Monks concerning the following question:

Hello monks,

I would like to use an external file that contains all of my hashes and then reference that file in my scripts.

I'm not sure where to begin, or what search terms are best to learn this process. any pointers and or links to learn are welcome.

I've included a sample of my current hashes that I'm using.

%Real_time = ( 0 => 'No', 1 => 'Yes', ); %Date_format = ( 0 => 'MM/DD/YY', 1 => 'DD/MM/YY', 2 => 'YY/MM/DD', );

Also I don't think I'm correctly calling/reading my file as perl does not appear to report it available using the following code...

BEGIN { no strict 'refs'; no warnings 'uninitialized'; printf("package %s\n", __PACKAGE__); for (qw( unit_id )) { printf("%s: exists:%s defined:%s prototype:%s\n", $_, exists(&{$_}) || 0, defined(&{$_}) || 0, prototype($_), ); } }
returns unit_id: exists:0 defined:0 prototype:
sorry I forgot that little bit.

thank you