<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.2627" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Ok, I know this must be a stupid question, I
probably just need more caffeine but.....</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I need to access a variable hash element
$user{$group}</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>if I have a Hash as : </FONT></DIV>
<DIV><FONT face=Arial size=2>my %user = ( name => 'Simon', group1 => '1',
group3 => '1') ;</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>and an array like :</FONT></DIV>
<DIV><FONT face=Arial size=2>my @groups = (qw/group1 group2 group3/
);</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>and I want to do:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2><td tal:repeat="group groups"></FONT></DIV>
<DIV><FONT face=Arial size=2> <span tal:content="user
group">is the user in the group</span></FONT></DIV>
<DIV><FONT face=Arial size=2></td></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I know this last bit is incorrect, but there must
be a simple way of accessing $user{$group}</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Thanks</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Simon</FONT></DIV></BODY></HTML>