my $startstring='(
)';
{
# this step removes the default end of line character (\n)
# so the the entire file can be read in at once.
local $/;
open (SLURP, "$direct$slash"."$file") or die "can't open $file: $!";
#read the contents into data
$data = ;
}
@finds=$data=~m/$keywords\s*.{0,1500}\s*($startstring.*?$endstring)/gism;