# Build regex list open KEYS,"patterns" or die "Can't open the pattern file: $!"; my $exp = Regexp::Assemble ->new(flags => 'ig',chomp => 1) ->add( ); close KEYS; $exp->track( 1 ); while (get the database records) { if ($exp->match($rec) ) { # populate a csv file for a spreadsheet } }