my @domains; while (my $row = $sth->fetchrow_hashref) { %aaa = %$row; #deref push @domains, $aaa; print $aaa{'subdomain'} . "\n"; #returns www } print @domains[0]{'subdomain'} . "\n"; #doesn't work ?? $template->param( DOMAINS => @domains #Doesn't work either # example from the manual goes as follows: #$template->param(EMPLOYEE_INFO => [ # { name => 'Sam', job => 'programmer' }, # { name => 'Steve', job => 'soda jerk' }, # ] # ); print $template->output;