Without further information on what you are trying to do and why you are making the hash like so - I'm not sure what you are asking. ie: what are you trying to loop through, a list of IP addresses? the arp cache?

assuming the IP address:

  my $ht = HTML::Template->new("some.tmpl");
  my @loop;
  foreach (@{$arpCache{$mac_address}}) {
    push @loop, { ip_address => $_ };
  $ht->param(arp_cache_mac_address => \@loop);

in the "some.tmpl":

  <TMPL_LOOP arp_cache_mac_address>
    <TMPL_VAR ip_address>

Alternatively if you are willing to change the push(...), you could write it as:

  push( @{$arpCache{$mac_address}}, { ip_address => $ip_addr } );
  $ht->param(arp_cache_mac_address => $arpCache{$mac_address} );

Hope this helps,

Raful Mr Mitchell H wrote:
My code puts together a hash like so...
push( @{$arpCache{$mac_address}}, $ip_addr );
How on earth could I get that output via a  TMPL_LOOP with TMPL_VAR?  Or is there a different way?

Mitchell Raful MCSE CCNP
MCB Quantico
Personal and Family Readiness (MRI)
3044 Catlin Avenue
Quantico, VA 22134
Com: 703-784-5991
DSN: 278-5991
Cell: 804-363-0731


------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace

_______________________________________________ Html-template-users mailing list Html-template-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/html-template-users