my $in; if (ref $scalar eq 'ARRAY') { $in = join(",",@$scalar); } else { $in = $scalar; }