in reply to how to quickly tell if number is in an array

Hi,

Try this code..
@a = (1,3,5);
$number = 3;

if((grep /$number/, @array)){
print "Found";
}else{
print "Not Found";
}


Thanks
Rajesh.K
  • Comment on Re: how to quickly tell if number is in an array