use strict; use warnings; my $sth = $dbh->prepare($query); $sth->execute(); my ($TICKET_ID,$PRIORITY,$ABSTRACT); $sth->bind_columns(\($TICKET_ID,$ABSTRACT,$PRIORITY)); while (my $row = $sth->fetchrow_arrayref) { print "$TICKET_ID $ABSTRACT $PRIORITY \n"; }