Hello all,
I am hoping that someone can help me out with my syntax regarding the use of
associative arrays.  Let's suppose that I create the following object:

my %family = (
      'mark' => {
            "tim" => {"sex","male","age","16"},
            "tracy" => {"sex","female","age","12"},
            "chantal" => {"sex","female","age","11"}
            },
      'john' => {
            "rob" => {"sex","male","age","10"},
            "sarah" => {"sex","female","age","5"},
            "ellen" => {"sex","female","age","3"}
            },
      'fred' =>{
            "bob" => {"sex","male","age","3"}
            }
      );

The print command below seems to work fine:

 print $family{"mark"}->{"chantal"}->{"age"} . "\n";

The following two commands do not work as (I) expected...

my %foobar = %family{"mark"};
print $foobar{"chantal"}->{"age"} . "\n";


I am trying to copy the "mark" sub array into a new variable (called
%foobar).  What am I doing wrong?  There seems to be an issue with
evaluation, references or pointers.

Many Thanks for any brief explanations of how the referencing works.  I have
not been able to find any good documentation with google on this subject.

Mark




-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to