in reply to Re^2: non-scalar hash key
in thread non-scalar hash key

Maybe the values in your hash could include the predicates in the original un-stringified format. That way you can have strings as keys, but lists still available when you need them later on in your program.

So your data structure might look like:

%allData = ( "1 2 3" => { location => "behind the sofa", predicates => [1, 2, 3], }, # More tokens here... );

--
use JAPH;
print JAPH::asString();

Replies are listed 'Best First'.
Re^4: non-scalar hash key
by kdejonghe (Novice) on Jun 17, 2009 at 11:33 UTC
    I'm afraid I do not have the luxury of adding another element to the hash values. We're dealing with a massive amount of data.
      I'm not suggesting that you add more data to your input files, if that's what you thought I meant.

      I'm suggesting that you extend the way the data is held in perl hashes/arrays/etc in memory when your program is running. And if you're not permitted to change how your program represents its data internally, then I'm not sure there's anything that anyone can do for you :-)

      --
      use JAPH;
      print JAPH::asString();

        I meant that I do not have the luxury of adding more information to the hash because I'm already running out of memory for some texts.