my @values = ...; # get the values however my $in_parts = join ',', @values; my $sql = "select * from aTable where some_field in ($in_parts)";