Help with arrays...
    Mark Ingram 
    mark.ingram at nexsan.com
       
    Mon Aug 11 12:24:04 UTC 2003
    
    
  
Hi,
i need help referencing members of an array in a template. I have the
following code and i cant seem to access what i want:
    my %products;
    my %versions;
    foreach my $p (@enterable_products) {
        if (CanEnterProduct($p))
        {
            $products{$p} = $::proddesc{$p};
            $versions{$p} = {"1.0", "2.0", "3.0"};
        }
    }
  $vars->{'proddesc'} = \%products;
  $vars->{'versions'} = \%versions;
In the template i have a loop going through each product, which works fine:
[% FOREACH p = proddesc.keys.sort %]
[% END %]
but i want to try to access the difference versions of each product too, i
have tried
     [% actual = proddesc.$p %]
     [% FOREACH ver = versions.$actual %]
         [% ver %]
     [% END %]
and numerous other ways, but to no avail.
Can anyone help me out?
Thanks
     Mark Ingram
      Software Engineer
      Nexsan Technologies
      33 - 35 Parker Centre
      Mansfield Road
      Derby
      DE21 4SZ
      United Kingdom
      p: +44 01332 291600
      f: +44 01332 291616
      w: http://www.nexsan.com
      e: mark.ingram at nexsan.com
      The next generation now!
      WINNER
      Best Enterprise Storage
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bugzilla.org/pipermail/developers/attachments/20030811/85ca7d8a/attachment.html>
    
    
More information about the developers
mailing list