$X = "x"; @array = qw / x y z 1 2 3 /; return scalar grep(/^$X$/,@array) > 0;