http://www.perlmonks.org?node_id=974957


in reply to given-when construct unexpected behavior with arrays

With grep, you're using a regular expression to find matches, which means all numeric values are stringified and then compared (as string).
You're almost there when you conclude that if you remove 0, elements 'a', 'ab' and 'abc' are not found anymore...
Apparently given-when does 'a' == 0 (which is true, when converting the string 'a' to a numerical value, it yields 0).

Edit: Aw, beaten to it by toolic :)