| Next | Hash Hash Hash | 17 |
my %category_count;
sub handle_article {
my ($path, $category, $article_body) = @_;
...
# lots of stuff
...
# count number of articles in each category
$category_count{ $category }++;
}
Oops, it turns out that the counts are wrong!
Because handle_article is called more than once for each article!
| Next | ![]() |
17 |