P is for Practical | |
PerlMonks |
Re^4: given-when construct unexpected bahavior wit arraysby brx (Pilgrim) |
on Jun 08, 2012 at 07:33 UTC ( [id://975103]=note: print w/replies, xml ) | Need Help?? |
Yep, doing map {"_$_"} @array before each test, in given-when, is not good. But grep works too much because if the first array element matches, you don't need to look others.This is probably the fastest solution :
update: You should also try with an hash %is_in_array
In Section
Seekers of Perl Wisdom
|
|