i had this working at one point but it suddenly stopped
(grrr)
sub BackAndForth {
my ($filename) = @_;
# make multi-dimensional hash here ... it looks like
# $ALLDATA{$filename}{$key1}{$key2}{$key3} = [@array]
return (%ALLDATA);
}
my %ExternalHash = &BackAndForth('filename.csv');
%ExternalHash = &BackAndForth('filename2.csv');
now i played around with it a bit and can't remember
what i may have changed ... $ here, % there (yadda yadda)
if i do a variable dump on %ALLDATA i get ...
%ALLDATA = (
'key1' => HASH(0x9021f6c)
'key2' => HASH(0x90154a8)
'key3' => ARRAY(0x9015400)
0 value1
1 value2
but if i do the same on %external i get
%thisDataset = (
'' => HASH(0x876f324)
'key2' => HASH(0x9029220)
empty hash)
looking at the memory locations, we can see that
they're not the same hashes (but that should be
obvious cause i'm getting the return of a strange
set of data)
where is the garbage coming from ?
prehaps
return(\%ALLDATA)
%external = (yadda yadda)
or
$external = (blah ...