Importing 80+ hashed and 1 array into several perl scripts

From: Matt Breedlove (mattbreedlove_at_yahoo.com)
Date: 11/24/03


Date: 24 Nov 2003 10:50:50 -0800

Ok, I dont see why this is so difficult, but it seems like all the
solutions
I have researched require me to identify each incoming variable which
is very
undesirable as there are 80+ hashes and 1 array.

Basically i have 5 script files that utilise the same 80+ hashes and
as it stands now I have the info duplicated in each script file, but
as this data will need to be modified from time to time, I would like
to have all the variables in a single config type file.

Here is a sample of the the config type file which just has alot of
hashes
%JUNIORS_SLEEPWEAR = (
                        "061" => "041",
                        "153" => "041",
                        "315" => "041",
                        "863" => "041",
                        "904" => "041",
                        "982" => "041",
                        "9041"=> "041"
                );

%JUNIORS_SNOW_FLEECE = (
                        "315" => "043",
                        "904" => "043",
                        "982" => "043",
                        "9043" => "043"
                );
%JUNIORS_SNOW_PANTS = (
                        "039" => "044",
                        "153" => "044",
                        "315" => "044",
                        "982" => "044",
                        "9044" => "044"
                );

%JUNIORS_SNOW_JACKETS = (
                        "039" => "045",
                        "153" => "045",
                        "315" => "045",
                        "982" => "045",
                        "9045" => "045"
                );
%JUNIOR_HOOD_CREW_SWEATSHIRTS = (
                        "144" => "046",
                        "153" => "046",
                        "315" => "046",
                        "863" => "046",
                        "865" => "046",
                        "904" => "046",
                        "941"=> "046",
                        "982" => "046",
                        "9046" => "046"
                );

All I want are all 80+ hashes to be available in each script memory
space
I dont understand why there isnt a module where I can "use" and just
pass it an
absolute path of the script that contains all the hashes and in one
wonderful line have all the hashes loaded into that script and
available for interation?
Perhaps I'm just missing something reall basic...I'm not a newbie to
perl by any means, but have never had to do this sort of thing before
Thanks in advance



Relevant Pages

  • Excellent Hacking Tool
    ... I dont know the details but either a compony called ... to crack win32 password hashes. ... The router wont send hashes for auth over the ... I repeat, email me at liamsp544@xxxxxxxx if you want a copy, I'll ...
    (alt.2600)
  • Re: Excellent Hacking Tool
    ... I dont know the details but either a compony called ... to crack win32 password hashes. ... The router wont send hashes for auth over the ... I repeat, email me at liamsp544@xxxxxxxx if you want a copy, I'll ...
    (alt.2600)
  • Re: Excellent Hacking Tool
    ... I dont know the details but either a compony called ... to crack win32 password hashes. ... The router wont send hashes for auth over the ... I repeat, email me at liamsp544@xxxxxxxx if you want a copy, I'll ...
    (alt.2600)
  • Re: Slow insertion to hashes?
    ... I load three such files in 3 different hashes. ... The two other files are also _DEAD SLOW_. ... I tried to comment various parts of the script and it seems that the whole problem is the size of each %H. ...
    (comp.lang.perl.misc)
  • Re: Slow insertion to hashes?
    ... >> I have to load a file. ... I 'index' the records in two hashes. ... the script takes under 50megs while running. ... > open IN, $in or die; ...
    (comp.lang.perl.misc)