Perl associative arrays
The Perl programming language is very well suited to the task of sifting through
many records and collecting data from selected fields. I have made heavy use of
its associative array capabilities, which let one define arrays indexed
by arbitrary strings of text. For example, one can define a `population' array
by putting:
$population{``Hartford'' } = 101349;
$population{``New Britain" } = 59553;
and so on. For doubly-indexed arrays use something like:
$population{``Hartford",``white'' } = 46382;
$population{``New Britain",``white''} = 50818;
$population{``Hartford'',``black''} = 37360;
$population{``New Britain",``black''} = 3920;
Use my Perl function draw_matrix.pl to convert doubly-indexed
arrays into a form that can be typset directly by TeX as tables, with
margin totals optional.