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);
In reply to Re: A quesion about referencing lists
by Mr. Muskrat
in thread A quesion about referencing lists
by barrd
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |