Possible Duplicate:
How can I check if a Perl array contains a particular value?
I have two arrays @array1 = (1..26);
, @array2 = ('a'..'z');
and a variable $x
. suppose $x=5
then how can I compare this value with two arrays and state in output that this variable belongs to @array1
?