in reply to Trying to display subcategories and counts
This would get you the desired behavior of having a CGI that can handle with and without a subcategory.my($category, $subcategory) = split(/&/, $ENV{'QUERY_STRING'}); if($subcategory ne "") { # Read in the file and look for the subcategory # specified, as you are already doing } else { # Read in the file and count the values in the # subcategory, as per turnstep's answer above. }
|
|---|