#!/usr/local/bin/perl # Copyright 1996 Kurt Pires. All rights reserved. # Copyright 1997 Kurt Pires. All rights reserved. # Permission to use all or portions of this code may be obtained # via e-mail from: kjpires@iat.com print <<'EOP';
I obtained the text of the act from ftp://ftp.loc.gov/pub/thomas/c104/s652.enr.txt and it can be read online at: http://thomas.loc.gov/cgi-bin/query/z?c104:S.652:.
I added the links to the United States Code listings at the Legal Information Institute of the Cornell Law School using s652.enr.pl to make it easier to follow on-line. I've also added links to the Code of Federal Regulations provide by the United States Government Printing Office.
EOP
while (<>) {
s/\r\n$/\n/;
s/^ {10}//;
s,&,&,g;
s,<,<,g;
s,>,>,g;
s,\[Italic->\],,g;
s,\[<-Italic\],,g;
# Section start:
s,^SEC(TION|\.) (\d+)(\..*),$&,; # Section index entry: s,^Sec\. (\d+)(\..*),$&,; # Title starts and index entries: if (s,^(\s+)TITLE (\S+)(--.*)$,
\1TITLE \2\3,) {
$title = $2;
if (! $title{$title}++) {
# Title index entry
s,,$&,;
s,,$&,;
} else {
# Title start
s,,$&,;
s,,$&,;
}
}
# Subtitle starts and index entries:
if (s,^(\s+)SUBTITLE (\S+)(--.*)$,\1SUBTITLE \2\3,) {
$subtitle = $2;
if (! $title{"$title/$subtitle"}++) {
# Title index entry
s,,$&,;
s,,$&,;
} else {
# Title start
s,,$&,;
s,,$&,;
}
}
$text .= $_;
}
$_ = $text;
$* = 1;
# U.S.C. cites:
s,(\d+)\s+U\.S\.C\.\s+(\d+),$&,g;
s,title\s+(\d+)\,\s+United\s+States\s+Code,$&,ig;
s,(section\s+(\d+))(\S*\s+of\s+title\s+(\d+)\,\s+United\s+States\s+Code),\1\3,ig;
s,(sections\s+(\d+))(\S*\s+and\s+)(\d+)(\S*\s+of\s+title\s+(\d+)\,\s+United\s+States\s+Code),\1\3\4\5,ig;
# C.F.R. cites:
s,(\d+)\s+C\.F\.R\.\s+(\d+)\.(\d+),$&,g;
#OLD: s,Code\s+of\s+Federal\s+Regulations,$&,ig;
#OLD: s,C\.F\.R\.,$&,g;
print;
print <<'EOP';