my $sql = "select * from Directory"; my $sth = $dbh->prepare($sql); $dbh->execute(); print "$_\n" for @{$sth->{NAME}};