Your post isn't very clear on what you are trying to accomplish. As you said, the code you posted will populate the template with the last .*map.* line. Although, you should probably add $vars{'d'} = $1; to fill out your template.
If you just want to spit the file out again, then you can try something like this in your loop:
$vars{'lines'} = [];
push @{ $vars{'lines'} }, {'proto' => $4,
'uri1' => $5,
'uri2' => $7,
'd' => $1};
Then you iterate in your template like so:
{ foreach $line (@lines)
{
$OUT .= "$line->{'d'} map $line->{'proto'}://$line->{'uri1'} $line
+->{'proto'}://$line->{'uri2'}\n";
}
}
PerlStalker
"To have something that works well, you have to reduce complexity. -- Werner Losh, FreeBSD Contributer |