in reply to Search for array element

Your issue is that the contents of $val1 contain regular expression control characters and you expect them to be interpreted literally. Given your context, the easiest solution would be to have Perl escape the control characters using a \Q and \E pair, i.e.

if(grep(/\Q$val1\E/i,@arr1))

For more information, read up on String interpolation and Regular Expressions.

Update: Upon a little further reflection, perhaps you mean

if(grep($val1 =~ /$_/i,@arr1)) { print "Value is present\n" ; } else { print "Value is not present\n"; }