US Census Bureau Perl success story

gnat on 2001-01-03T17:39:16

gnat writes "O'Reilly's Perl Success Stories database has another entry: the US Census Bureau."


This is the actual code :-)

thomasj on 2001-01-04T09:52:30

open(NAMES, "<", "/var/census/names.txt") or die "Do the census first!";
while ($people{<NAMES>}++) {};
close NAMES;
$sum = 0;
foreach $name (sort keys %people) {
  $n = $people{$name};
  $sum += $n;
  printf "%6d $name", $people{$name};
}
print "=" x 72, "\n";
print "Total: $sum\n";

Re:This is the actual code :-)

delegatrix on 2001-01-04T14:10:58

We wish it were that easy.

-lisa

Re:This is the actual code :-)

duff on 2001-01-04T15:32:14



while ($people{<NAMES>}++) {};



Gosh, I hope that isn't the actual code, because it doesn't do anything useful that I can see. ;-)