in reply to Getting length of longest value in a column

To be able to determine the longest value, you need to get all of them. So, I'd use something like:
... $sth->execute; my $all = $sth->fetchall_arrayref; my @max = (0) x 3; foreach my $row (@$all) { for (my $i = 0; $i < @$row; $i++) { $max[$i] = length $$row[$i] if length $$row[$i] > $max[$i]; } }
Now $max[0] contains the length of the largest ticket_id, $max[1] the length of the largest abstract, and $max[2] the length of the largest priority.