in reply to array search on mysql result

If you want to check the existence of something in a list of items, then you should probably use a hash rather than an array. Store your items as keys of the hash and just put anything you like as value (it's not gonna be used anyway). Then you only need to so something like this:
if (exists $mobile_numbers{$new_number}) { # ... } else { $mobile_numbers{$new_number} = 1; # ... }