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 ...

In reply to passing a multidimentional hash-sub-hash (to a sub and back again) by Buckaroo Buddha

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.