my $ref = $sth->fetchall_arrayref(); my $second_name = $ref->[1]->[1];