in reply to Re^2: Adding a number from scalar variable to array name
in thread Adding a number from scalar variable to array name

Using the hash of array references will work for you.

Instead of @array1=(1,2,3) you say $hash{1}=[ 1,2,3 ]. Then, to use this as an array you would say "...where id in @{$hash{1}}..."

  • Comment on Re^3: Adding a number from scalar variable to array name