in reply to Difference between exists and defined

From the documentation:

WARNING: Calling exists on array values is strongly discouraged. The notion of deleting or checking the existence of Perl array elements is not conceptually coherent, and can lead to surprising behavior.

I would not use exists with arrays, only with hashes. YMMV.

  • Comment on Re: Difference between exists and defined