in reply to Code and html separation - always or mostly doable?
my @colors = ('#FFFFFF', '#F0F0F0'); my $cnt = 1; foreach my $row (@$list) { $row->{bgcolor} = $colors[$cnt % 2]; # Assign $row to your template engine or AoH or whatever... $cnt++; }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Code and html separation - always or mostly doable?
by amw1 (Friar) on Jun 16, 2004 at 19:45 UTC | |
Re^2: Code and html separation - always or mostly doable?
by Michalis (Pilgrim) on Jun 16, 2004 at 20:10 UTC | |
by saberworks (Curate) on Jun 17, 2004 at 05:53 UTC | |
by Michalis (Pilgrim) on Jun 17, 2004 at 09:28 UTC | |
by saberworks (Curate) on Jun 17, 2004 at 17:01 UTC |