Hi,
can I use array elements ( all ) in conditional statements?
the problem is ,the total number of elements is not known.
e.g
A is an array with elements - 1,2,3
now if i want to test if the 1 st field of input record is either 1,2 or 3, i can do something like this
if ( $1 ~ /^A[1]$|^A[2]$|^A[3]$/) { print YES }
but i want something like..
if ( $1 ~ /^A[1]$|^A[2]$|^A[3]$/| logical OR till array's last element) { print YES }
Is that possibe?