while ( @array_c = $sth->fetchrow()){ $TOALL = &cleaner ($pointer->{'ACCOUNT#'}); push @array_c,$TOALL; # Array that has all account numbers } print " $array_c ";