while(my $ref = $sth->fetchrow_arrayref) { push @sw_regexps, qr($ref->[0]); }