in reply to sql select with array

In general "@array" concatenates the items in the array in to a string without any separator (but see perlvar). In the case of SQL, you'd probably like comma's between your items (see join):
...._arrayref( "select ". join( ', ', @selector) . " from people .... "
Jeroen