#! perl use strict; use warnings; use HTML::FormatText; use LWP::Simple; my $address = 'http://www.sec.gov/Archives/edgar/data/1557421/' . '000100201412000509/iogcs1-9132012.htm'; my $content = get($address); defined $content or die "Cannot read '$address': $!"; my $string = HTML::FormatText->format_string ( $content, leftmargin => 5, rightmargin => 75, ); print $string; #### 13:44 >perl 1415_SoPW.pl Wide character in print at 1415_SoPW.pl line 19. S-1 1 iogcs1-9132012.htm INFINITY OIL & GAS COMPANY FORM S-1 (9/13/2012). Registration No. _________________________ ---------------------------------------------------------------------- ---------------------------------------------------------------------- SECURITIES AND EXCHANGE COMMISSIONWashington, D.C. 20549_________________FO RM S-1REGISTRATION STATEMENT UNDERTHE SECURITIES ACT OF 1933 INFINITY OIL & GAS COMPANY(Name of small business issuer in its charter) Nevada 1081 (State or Other Jurisdiction of Organization) (Primary Standard Industrial Classification Code) _________________ 750 Broadway #### use strict; use warnings; use HTML::FormatRTF; use LWP::Simple; my $outfile = 'test.rtf'; my $address = 'http://www.sec.gov/Archives/edgar/data/1557421/' . '000100201412000509/iogcs1-9132012.htm'; my $content = get($address); defined $content or die "Cannot read '$address': $!"; open(my $rtf, '>', $outfile) or die "Cannot open file '$outfile' for writing: $!"; print $rtf HTML::FormatRTF->format_string($content); close $rtf or die "Cannot close file '$outfile': $!";