in reply to Like in hashes, do we have something like exists in arrays as well.

This will work for you:
print "$element in @array1\n" if(grep( /$element/, @array1 )) ;
  • Comment on Re: Like in hashes, do we have something like exists in arrays as well.
  • Download Code