in reply to Modifying data in a hash before sending to template

I would suggest pulling the data from the DB as a hashref. There is a good HTML::Template and DBI example doing just this at HTML::Template Tutorial. To modify the data you would just loop through it:

my $ref = $sth->fetchall_hashref('key_field'); for my $key( %$ref ) { $ref->{$key}->{some_field} = modify( $ref->{$key}->{some_field} ); } # pass modified hash to HTML::Template sub modify { my $val = shift; # modify val return $val; }

cheers

tachyon