my $sql = $self->{'cfg'}->param("sql.get_service_plans"); $self->log('The $service_plans query reads: ',$sql); my $sth = $self->{'dbh'}->prepare($sql) or die $self->{'dbh'}->errstr; $self->log('It\'s $sth looks like this: ',$sth); my $service_plans = $sth->execute() or die $self->{'dbh'}->errstr;; $self->log('The $service_plans query looks like this: ',$service_plans); while (my $plan = $service_plans->fetchrow_hashref()){ print Dumper($plan); }