in reply to Hash Question

Use DB_File or some other DBM module to create a DBM file that stores the hash on disk, then just have each script declare a hash and tie() it to the DBM file. Tying a hash changes its behavior; when you tie a hash to a DBM file, you can make the hash absorb the contents of the hash in the DBM file, make it so any changes to the hash also modify the hash in the DBM file, and other neat stuff depending on the DBM library.

This code here creates the hash and stores it the hash.dbm DBM file:

use DB_File; my %hash; tie (%hash, 'DB_File', 'hash.dbm', O_CREAT|O_RDWR) || die $!; %hash=( '000001' => 'ITEM _First', '000002' => 'Item B', '000003' => 'House', '000004' => 'Service C', '000005' => 'Service X', '000006' => 'Service Z', '00007b' => 'Adjust Area', '020902' => 'Campus', '0sdc45' => 'Unit C', '000011' => 'Unit B', '0wed45' => 'Lower Level', '0ws456' => 'Cars', '02100m' => 'Numbers' );

Afterwards, any script that wants to manipulate the hash in hash.dbm need only just tie() the DBM file for reading and writing, like this:

use DB_File; my %hash tie (%hash, 'DB_File', 'hash.dbm', O_RDWR) || die $!;

then modifying %hash will result in modifying the hash stored in hash.dbm.

If you want a hash in one script to be able to copy the contents of the hash in hash.dbm but not to actually modify it, then tie() the hash for reading only instead of for reading and writing:

my %hash tie (%hash, 'DB_File', 'hash.dbm', O_RDONLY) || die $!;

now modifying %hash won't affect the hash stored in hash.dbm.