in reply to Trying to display subcategories and counts
...should do what you want. Regards, Pat Heuvel pheuvel@optusnet.com.auwhile(<>) { ($categ, $subcat, $therest) = split(/|/, $_, 3); $subcatcount{$subcat}++; } foreach $subcategory (sort keys(%subcatcount)) { print "$subcategory contains $subcatcount{$subcategory}\n"; }
|
|---|