[htmltmpl] TMPL_LOOP limit or count

2011-04-29 Thread David A. Bandel
Folks, Been using HTML::Template in a few projects. Really nice not to have HTML tangled in the Perl code. Got a largish hash I am sorting. Want to output only about 15 lines of the table. Is there a way to tell the loop to stop? Here's what I'm doing: my @calloutdata; foreach $callskey (

Re: [htmltmpl] TMPL_LOOP limit or count

2011-04-29 Thread Michael Peters
On 04/29/2011 05:28 PM, David A. Bandel wrote: my @calloutdata; foreach $callskey ( sort {$callnum{$b}= $callnum{$a}} keys %callnum){ my %outbound; $outbound{EXTENNUMCALLED} = $callskey; $outbound{TIMESCALLED} = $callnum{$callskey}; push( @calloutdata, \%outbound

Re: [htmltmpl] TMPL_LOOP limit or count

2011-04-29 Thread vijay.krishna.ram...@gmail.com
Just a different way of thinking about it, but you could always output all the rows and use html/css to hide the ones after #15 or whatever. That way you're a bit more in keeping with data/presentation split that HTML::Template enforces... Vijay Krishna Ramesh vijay.krishna.ram...@gmail.com

Re: [htmltmpl] TMPL_LOOP limit or count

2011-04-29 Thread David A. Bandel
On Fri, Apr 29, 2011 at 16:45, vijay.krishna.ram...@gmail.com vijay.krishna.ram...@gmail.com wrote: Just a different way of thinking about it, but you could always output all the rows and use html/css to hide the ones after #15 or whatever. That way you're a bit more in keeping with

Re: [htmltmpl] TMPL_LOOP limit or count

2011-04-29 Thread David A. Bandel
On Fri, Apr 29, 2011 at 16:37, Michael Peters mpet...@plusthree.com wrote: On 04/29/2011 05:28 PM, David A. Bandel wrote: my @calloutdata; foreach $callskey ( sort {$callnum{$b}=  $callnum{$a}} keys %callnum){     my %outbound;     $outbound{EXTENNUMCALLED}  = $callskey;