#MY SCRIPT use strict; use warnings; use Template; my $template = Template->new; if($info) { my $select = $DBH->prepare("SELECT FOO, BAR, MOO FROM tble WHERE CONCAT(FOO, ', ', BAR, ', ', MOO) LIKE ?"); $select->execute('%'.$info.'%'); $names = $select->fetchall_arrayref(); foreach $names ( @$names) { ($variable1, $variable2, $variable3) = @$names; } } my $templ = < Untitled Document [% FOREACH name IN list %]
  • Edit user
  • [% END %] START_HTML $template->process (\$templ, { list => \@names }) or die $template->error; #### ARRAY(0x2030674) ARRAY(0x2030634) ARRAY(0x2030618)