# define files containing tables (tab-delimited text files) my @files = ['tab1.txt','tab2.txt']; # Define master hash "$ptables" my %ptables; #read files and add data to the HoA: foreach my $file (@files) { my @string_array = Read_File($file); # define arrays of strings my $hash_key =~ s/\.txt//; # generate hash key $ptables{$hash_key} = [ @string_array ]; # save all strings to the hash }