sub displayphone { #Retrieve current state of the object my $self = shift; #Shortcut to return a reference to an array of hash elements my %attr = ( dbi_fetchall_arrayref_attr => {}); #Preparing the template and substitute the values my $template = HTML::Template->new(filename => 'displayphone.tmpl'); $template->param(ROWS => $dbh->selectall_arrayref("SELECT * FROM directory ORDER BY lastname", \%attr, $value),); #Display results return $template->output; }