Not hard to do when dealing with references! ;)
The problem is that you are assigning a REFERENCE TO A HASH to the HASH itself,
because you're using '{}' when assigning to %T.
$T{d4} has the opposite problem -- it needs to be associated with a SCALAR, ie. a
REFERENCE TO A HASH. '()' is a LIST, not a REFERENCE.
So, switch your '{}'s and '()'s and it should do what you want it to.
Also, when you reference some field from $T{d4}, you need to be sure to deREFERENCE it
like this:
$T{d4}->{names}
So you'll have to change that in the popup_menu.
HTH!
christopher
-----Original Message-----
From: Jerry Preston [mailto:[EMAIL PROTECTED]]
Sent: Friday, July 27, 2001 9:12 AM
To: begginners
Subject: lost in hashes
Hi,
I just can't see where I have missed it!
%T = {
d4 => (
names => [ "", "Ron", "Tony", "Jeff", "Scott", ],
),
};
print $query->popup_menu( -name =>'Test',
-values => $T{ "d4" }{ "names" },
-default => ''
);
Do you?
Thanks for Your help!!
Jerry
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]