in reply to Re^2: naming a variable with the datum from another variable
in thread naming a variable with the datum from another variable

Can I put an associative array within another associative array without all the data in them getting jumbled up?
Yes. That is a Hash of Hashes, HoH in short. see perlref and perlreftut. In fact you can create any kind of data-structure using perl-hashes and arrays. I donīt know if there is a "deepness"-limit but i doubt that.

#sample set up a hash of hashes my %h = ( key1 => { subkey11 => subval11, subkey21 => subval21 }, key2 => { subkey12 => subval12, subkey22 => subval22 }, ); #access it print $h{key1}->{subkey11}; #loop it for ( keys %{$hash->{key2}} ) { print $hash->{key2}->{$_}; }
Update:
And yes, show us your code. But be sure to strip all non-relevant parts.

holli, /regexed monk/

Replies are listed 'Best First'.
Re^4: naming a variable with the datum from another variable
by Tanktalus (Canon) on Feb 12, 2005 at 18:07 UTC
    I donīt know if there is a "deepness"-limit but i doubt that.

    Trust me - if there is, it's very, very large. I've had structures looking like join 'o', ('H') x dozens. 30+ deep. Even perl 5.6 could handle it. (Once they were all objects, perl 5.8 became required - 5.6 would crash.)