#!/usr/bin/perl -w #use strict; # This program extracts data from an SEC filing, including chunks of text use Benchmark; #get the HTML-Format package from the package manager. use HTML::Formatter; #get the HTML-TREE from the package manager use HTML::TreeBuilder; use HTML::FormatText; $startTime = new Benchmark; #This program is written to obtain "Significant Accounting Policies" which are typically found in item 4/4 of the 10k my $startstring='((^\s*?)Significant Accounting Policies\s\n)'; #Specify keywords/phrases you expect to find within the item (make sure the words phrases are not also in the start or end string) my $keywords='(estimates|Financial Accounting Standards Board|Revenue Recognition|generally accepted accounting principles|accruals|inventories|straight-line|)'; #horizontal line means alternative match if not found #Specify the end of the text you are looking for. # Need to create a flexible end string that uses +1 the variable in front of "SAP" my $endstring='((^\s*?)Item\s+(10)[\.\-]?[^\d]*?\n)'; my $direct="D:\\ExternalFiles\\Edgar\\tenks\\randomsort";