r0adawg has asked for the wisdom of the Perl Monks concerning the following question:
Hello monks,
sorry I forgot that little bit.
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...
returns unit_id: exists:0 defined:0 prototype: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($_), ); } }
sorry I forgot that little bit.
thank you
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: using external file for hashes
by topher (Scribe) on Jun 05, 2013 at 03:46 UTC | |
Re: using external file for hashes
by rpnoble419 (Pilgrim) on Jun 05, 2013 at 02:44 UTC | |
Re: using external file for hashes
by derby (Abbot) on Jun 04, 2013 at 18:10 UTC | |
Re: using external file for hashes
by frozenwithjoy (Priest) on Jun 04, 2013 at 18:17 UTC | |
by r0adawg (Beadle) on Jun 04, 2013 at 18:26 UTC | |
by frozenwithjoy (Priest) on Jun 04, 2013 at 18:33 UTC | |
by choroba (Cardinal) on Jun 04, 2013 at 18:40 UTC |
Back to
Seekers of Perl Wisdom