## This assumes your select begins 'SELECT [ACCOUNT#]', ## that is, ACCOUNT# is the first column returned @array_claim = map { $$_[0] } @{$sth->fetchall_arrayref};