in reply to Re^2: Populating an Array of hash's
in thread Populating an Array of hash's
map +{ NAME => $_ }, LIST
is another way of writing
map { { NAME => $_ } } LIST
The expression { NAME => $_ }
The expression map { { NAME => $_ } } @files
In other words,
$template->param( FILES => [ map +{ NAME => $_ }, @files ], );
could have been written
my @files_param; for (@files) { push @files_param, { NAME => $_ }; } $template->param(\@files_param);
|
|---|