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


in reply to Grep expansion problem

Is there a specific reason for doing an exact match via regex when an equality check would suffice?
if ( grep $_ eq $x, @b ) { ... }
This would be faster and would not be vulnerable to metacharacter interpolation.

Ivan Heffner
Sr. Software Engineer, DAS Lead
WhitePages.com, Inc.