my ( %row , @rows ); $sth->bind_columns( \( @row{ @{$sth->{NAME_lc}} } ) ); while ( $sth->fetchrow_arrayref ) { my %row_copy = %row; push @rows, \%row_copy; } $tt->process("result.tt", { result => \@rows })