in reply to What is being matched?

If you are looking for a list of words, then you can use "match global" to find out which of those words occurred in the text. The result of this can be put into a hash table, like I did below using a simple map{} or assigned directly to an array, @matched.

Then use logic to do more complicated AND's and OR's on the subset of the words that matched.

#!/usr/bin/perl -w use strict; my $text = "Mr. X is a bozo and was hired and then resigned."; #build an "OR" regex from a list of search words #add \b (boundary) in front and back, then | between my @search_words = qw(bozo hired resigned); @search_words = map{"\\b$_\\b";}@search_words; my $search_regex = join("|",@search_words); #print "search_regex is: $search_regex\n"; #debug my %matched = map{$_=>1}($text =~ m/$search_regex/gi); #match global print "This bozo resigned - thank goodness!" if ($matched{bozo} and $matched{resigned}); #prints: This bozo resigned - thank goodness!
Now having said that, perhaps we are answering the wrong question here? The SEC has the EDGAR (Electronic Data Gathering, Analysis, and Retrieval system) online. If you look here, main SEC filing forms site and look at EDGAR Searches, there is a button to do advanced boolean searches.The 10-K filings etc are in EDGAR, but I think there is some stuff that is missing - you would have to look. Perhaps, what you need is an LWP program that uses the EDGAR website? I don't know - just an idea.