in reply to A quesion about referencing lists
I would think that the following would do the same as your last snippet. Not to mention that it should use less memory.
my $curr_year = (localtime)[5]; $curr_year += 1900; for ($curr_year - 100 .. $curr_year - 5) { push @years_loop, { year => $_ }; } $template->param(years_loop => \@years_loop);
|
|---|